int two() { return 2; }
struct myINT {
int i;
};
myINT makeINT() { return myINT{5}; } // <-- error: 'myINT' does not name a type
void setup() {}
void loop() {}
It will compile again if the definition of two() is moved after the one of myINT.
Yeah, but they make the life of expert C++ programmers a nightmare. I basically lost one entire day on this, trying to narrow down a fairly large project.
I don't know, it's on my to-do list. Maybe Eclipse has a plugin. I believe you can avoid the automatic prototyping by placing your code in a .cpp instead of .ino file: https://www.gammon.com.au/forum/?id=12625