Why won't this code compile?
class AlphaClass {
public:
void init();
};
class BetaClass : public AlphaClass {
public:
void init();
};
Severity Code Description Project File Line
Error 13:1: error: expected class-name before '{' token
Why won't this code compile?
class AlphaClass {
public:
void init();
};
class BetaClass : public AlphaClass {
public:
void init();
};
Severity Code Description Project File Line
Error 13:1: error: expected class-name before '{' token
What you posted compiles without error.
I suspect a macro name "AlphaClass".
Thanks for checking. I changed AlphaClass to AlphaXClass and get the same results. I was able to duplicate the results in the Arduino IDE (I use Visual Micro in Visual Studio).
If you want more help you will have to post more code.
I get the same thing. This code compiles. The problem would appear to be in code that you haven't posted, or possibly a stray non-ascii character hiding in the white space.
void setup() {}
void loop() {}
class AlphaClass {
public:
void init();
};
class BetaClass : public AlphaClass {
public:
void init();
};