Fighting Arduino's IDE smartness

trurl:
How can I stop Arduino from messing around with the code I wrote?

I'm afraid that when you use the Arduino IDE to build your sketch, the messing about is done for you. It's supposed to be helpful, although I must admit I'd be happy without that 'help'.

Your code declares a struct Boton but not a type Boton. If you want to define a type, you could use a typedef.

typedef struct Boton {
  int pin;
} Boton;

(Alternatively you could use 'struct Boton' instead of 'Boton', but I think defining a type is cleaner.)

Also, the IDE will be adding a function declaration for you, even though your sketch would have compiled without it. However, the declaration is placed above your code and above your own declaration and the typedefs that it depends on. You should be able to prevent the IDE from generating the declaration by putting in a declaration of your own somewhere after the declaration of the Boton type:

void Chequea(Boton &b);