Following a tutorial and getting this error:
instances\instances\main.cpp(65): error C2143: syntax error : missing ';' before '.'
Am i missing something or is the compiler taking the piss?
code for the header and .cpp here:
.cpp:
If u need any other code ill supply, ive tried to figure this out and its racking my brain ...
edit:
this is how im declaring stuff in the main:
The error is somewhere in main.cpp. The code you provided is not relevant .
As per your edit, to access a static class method or variable you do this:
Foo::Bar()
Not:
Foo.Bar()
In some places, you access the ScreenManager::GetInstance the latter way. You need to do it the former.
It looks to me like it's complaining about syntax on line 65 (possible a line or three before 65) in main.cpp. Post that.
the whole of my main here:
thanks for the replies anyways guys this is really annoying
EDIT:
aaron you are absolutley right! why did i even do that lmao!! life saver thanks ever so much and to those for suggestions
It won't compile without all those header files, but
ScreenManager.GetInstance().Update(events);
on line 65 looks suspicious to me (Disclaimer: I don't do C++)
Should it be
ScreenManager(GetInstance(Update(events)));
?
Thanks Arthur but im calling a static function so therefore i cannot do anything but ScreenManager::GetInstance().Update(); etc.. Thanks anyways