I have a project with multiple files including main.cpp and two headers. Both headers have an error at the line with class name declaration. Building any of the files or project as a whole gives no errors or warnings. The program itself runs correctly.
I'm using CodeLite IDE and GCC compiler.
What can be a reason for such behaviour and could it lead to any issues in the future?
#include <Creature.h>
#include <Party.h>
int main() {
// Does something with the stuff from header files.
return 0;
}
Inside Creature.h:
#pragma once
class Creature { // Error: expected ';' after top level declarator
// something
};
Inside Party.h:
#pragma once
class Party { // Error: expected identifier or '('
// something
};