new to this forum and to programming so please forgive any potential mistakes in my question. I am trying to code a game in c++ using SDL2 and Xcode 6.3.2. In my Game class (see below) Xcode does not recognise my destructor and gives me the error: expected member name or ';' after declaration I have no idea what is wrong with my destructor or my code in general. My question is simply: What have I done wrong? Thanks in advance!
update: Narrowed the issue down and ran the code in cpp.sh without any issues. Xcode still gives the error message and I am unable to build because of it. I have tried restarting my computer, deleting the derived data and cleaning the build folder but to no effect.
int main() {
class Game {
public:
Game();
~Game(); //here is the issue
};
}
update 2: Simply removed the non working code and retyped it. The error message did not reappear and the build succeeded. Xcode had probably indeed cached the error message in some strange way.