Why is visual studio giving me a bunch of false errors?

Started by
20 comments, last by jpetrie 7 years, 6 months ago

So, today when I started up visual studio, it greeted me with 158 errors.
I checked some of them and they don't make any sense.

Here to example :


'SwEngine::Application::AddGamestate': function does not take 1 arguments.

And sure, I guess that's true, but I'm not even giving it 1 argument, I'm giving it 2 :


AddGamestate("MainMenuState", new MainMenuState(*_application));

I don't understand why I'm getting all these errors..
I don't know if my code is wrong or if they are actually false either.

Any ideas on what I should do?

Here's a full list of all the errors :

[spoiler]Error C2238 unexpected token(s) preceding ';' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\mainmenustate.h 49
Error C2664 'SwEngine::MainMenuState::MainMenuState(const SwEngine::MainMenuState &)': cannot convert argument 1 from 'SwEngine::Application' to 'const SwEngine::MainMenuState &' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.cpp 39
Error C2660 'SwEngine::Application::AddGamestate': function does not take 1 arguments SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.cpp 39
Error C2664 'SwEngine::GameplayState::GameplayState(const SwEngine::GameplayState &)': cannot convert argument 1 from 'SwEngine::Application' to 'const SwEngine::GameplayState &' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.cpp 40
Error C2660 'SwEngine::Application::AddGamestate': function does not take 1 arguments SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.cpp 40
Error C2039 'CreateGameObject': is not a member of 'SwEngine::EntityManager' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.cpp 46
Error C2227 left of '->Create' must point to class/struct/union/generic type SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.cpp 46
Error C2039 'CreateGameObject': is not a member of 'SwEngine::EntityManager' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.cpp 51
Error C2227 left of '->Create' must point to class/struct/union/generic type SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.cpp 51
Error C2061 syntax error: identifier 'GameState' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 50
Error C2061 syntax error: identifier 'GameState' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 50
Error C2061 syntax error: identifier 'GameState' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 50
Error C2061 syntax error: identifier 'GameState' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 50
Error C2061 syntax error: identifier 'GameState' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 50
Error C2143 syntax error: missing ';' before '*' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 68
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 68
Error C2238 unexpected token(s) preceding ';' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 68
Error C2143 syntax error: missing ';' before '*' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 68
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 68
Error C2238 unexpected token(s) preceding ';' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 68
Error C2143 syntax error: missing ';' before '*' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 68
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 68
Error C2238 unexpected token(s) preceding ';' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 68
Error C2143 syntax error: missing ';' before '*' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 68
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 68
Error C2238 unexpected token(s) preceding ';' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 68
Error C2143 syntax error: missing ';' before '*' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 68
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 68
Error C2238 unexpected token(s) preceding ';' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 68
Error C2065 'GameState': undeclared identifier SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 103
Error C2059 syntax error: '>' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 103
Error C2976 'std::vector': too few template arguments SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 103
Error C2065 'GameState': undeclared identifier SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 103
Error C2059 syntax error: '>' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 103
Error C2976 'std::vector': too few template arguments SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 103
Error C2065 'GameState': undeclared identifier SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 103
Error C2059 syntax error: '>' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 103
Error C2976 'std::vector': too few template arguments SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 103
Error C2065 'GameState': undeclared identifier SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 103
Error C2059 syntax error: '>' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 103
Error C2976 'std::vector': too few template arguments SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 103
Error C2065 'GameState': undeclared identifier SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 103
Error C2059 syntax error: '>' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 103
Error C2976 'std::vector': too few template arguments SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 103
Error C2143 syntax error: missing ';' before '*' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 106
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 106
Error C2238 unexpected token(s) preceding ';' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 106
Error C2143 syntax error: missing ';' before '*' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 106
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 106
Error C2238 unexpected token(s) preceding ';' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 106
Error C2143 syntax error: missing ';' before '*' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 106
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 106
Error C2238 unexpected token(s) preceding ';' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 106
Error C2143 syntax error: missing ';' before '*' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 106
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 106
Error C2238 unexpected token(s) preceding ';' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 106
Error C2143 syntax error: missing ';' before '*' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 106
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 106
Error C2238 unexpected token(s) preceding ';' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\application.h 106
Error C2061 syntax error: identifier 'GameState' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 24
Error C2061 syntax error: identifier 'GameState' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 24
Error C2061 syntax error: identifier 'GameState' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 24
Error C2143 syntax error: missing ';' before '*' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 30
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 30
Error C2238 unexpected token(s) preceding ';' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 30
Error C2061 syntax error: identifier 'GameState' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 30
Error C2143 syntax error: missing ';' before '*' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 30
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 30
Error C2238 unexpected token(s) preceding ';' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 30
Error C2143 syntax error: missing ';' before '*' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 30
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 30
Error C2238 unexpected token(s) preceding ';' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 30
Error C2143 syntax error: missing ';' before '*' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 30
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 30
Error C2238 unexpected token(s) preceding ';' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 30
Error C2143 syntax error: missing ';' before '*' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 30
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 30
Error C2238 unexpected token(s) preceding ';' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 30
Error C2061 syntax error: identifier 'GameState' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 33
Error C2061 syntax error: identifier 'GameState' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 33
Error C2061 syntax error: identifier 'GameState' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 33
Error C2061 syntax error: identifier 'GameState' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 36
Error C2061 syntax error: identifier 'GameState' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 36
Error C2061 syntax error: identifier 'GameState' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 36
Error C2143 syntax error: missing ';' before '*' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 46
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 46
Error C2238 unexpected token(s) preceding ';' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 46
Error C2143 syntax error: missing ';' before '*' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 46
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 46
Error C2238 unexpected token(s) preceding ';' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 46
Error C2143 syntax error: missing ';' before '*' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 46
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 46
Error C2238 unexpected token(s) preceding ';' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 46
Error C2143 syntax error: missing ';' before '*' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 46
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 46
Error C2238 unexpected token(s) preceding ';' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 46
Error C2143 syntax error: missing ';' before '*' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 46
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 46
Error C2238 unexpected token(s) preceding ';' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 46
Error C2065 'GameObject': undeclared identifier SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 54
Error C2059 syntax error: '>' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 54
Error C2976 'std::vector': too few template arguments SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 54
Error C2065 'GameObject': undeclared identifier SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 54
Error C2059 syntax error: '>' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 54
Error C2976 'std::vector': too few template arguments SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 54
Error C2065 'GameObject': undeclared identifier SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 54
Error C2059 syntax error: '>' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 54
Error C2976 'std::vector': too few template arguments SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 54
Error C2065 'GameObject': undeclared identifier SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 54
Error C2059 syntax error: '>' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 54
Error C2976 'std::vector': too few template arguments SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 54
Error C2065 'GameObject': undeclared identifier SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 54
Error C2059 syntax error: '>' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 54
Error C2976 'std::vector': too few template arguments SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\entitymanager.h 54
Error C2504 'GameState': base class undefined SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 12
Error C2504 'GameState': base class undefined SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 12
Error C2504 'GameState': base class undefined SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 12
Error C2504 'GameState': base class undefined SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 12
Error C2061 syntax error: identifier 'Application' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 17
Error C2061 syntax error: identifier 'Application' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 17
Error C2061 syntax error: identifier 'Application' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 17
Error C2061 syntax error: identifier 'Application' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 17
Error C2061 syntax error: identifier 'Application' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 17
Error C2061 syntax error: identifier 'Application' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 17
Error C2535 'SwEngine::GameplayState::GameplayState(void)': member function already defined or declared SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 19
Error C2535 'SwEngine::GameplayState::GameplayState(void)': member function already defined or declared SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 19
Error C2535 'SwEngine::GameplayState::GameplayState(void)': member function already defined or declared SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 19
Error C2535 'SwEngine::GameplayState::GameplayState(void)': member function already defined or declared SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 19
Error C2535 'SwEngine::GameplayState::GameplayState(void)': member function already defined or declared SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 19
Error C2535 'SwEngine::GameplayState::GameplayState(void)': member function already defined or declared SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 19
Error C2143 syntax error: missing ';' before '*' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 44
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 44
Error C2238 unexpected token(s) preceding ';' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 44
Error C2143 syntax error: missing ';' before '*' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 44
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 44
Error C2238 unexpected token(s) preceding ';' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 44
Error C2143 syntax error: missing ';' before '*' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 44
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 44
Error C2238 unexpected token(s) preceding ';' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 44
Error C2143 syntax error: missing ';' before '*' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 44
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 44
Error C2238 unexpected token(s) preceding ';' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 44
Error C2143 syntax error: missing ';' before '*' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 44
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 44
Error C2238 unexpected token(s) preceding ';' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 44
Error C2143 syntax error: missing ';' before '*' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 44
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 44
Error C2238 unexpected token(s) preceding ';' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 44
Error C2061 syntax error: identifier 'Application' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gamestate.h 17
Error C2061 syntax error: identifier 'Application' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gamestate.h 17
Error C2535 'SwEngine::GameState::GameState(void)': member function already defined or declared SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gamestate.h 19
Error C2535 'SwEngine::GameState::GameState(void)': member function already defined or declared SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gamestate.h 19
Error C2504 'GameState': base class undefined SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\mainmenustate.h 17
Error C2504 'GameState': base class undefined SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\mainmenustate.h 17
Error C2504 'GameState': base class undefined SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\mainmenustate.h 17
Error C2504 'GameState': base class undefined SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\mainmenustate.h 17
Error C2061 syntax error: identifier 'Application' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\mainmenustate.h 22
Error C2061 syntax error: identifier 'Application' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\mainmenustate.h 22
Error C2061 syntax error: identifier 'Application' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\mainmenustate.h 22
Error C2061 syntax error: identifier 'Application' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\mainmenustate.h 22
Error C2061 syntax error: identifier 'Application' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\mainmenustate.h 22
Error C2061 syntax error: identifier 'Application' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\mainmenustate.h 22
Error C2143 syntax error: missing ';' before '*' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\mainmenustate.h 49
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\mainmenustate.h 49
Error C2238 unexpected token(s) preceding ';' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\mainmenustate.h 49
Error C2143 syntax error: missing ';' before '*' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\mainmenustate.h 49
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\mainmenustate.h 49
Error C2238 unexpected token(s) preceding ';' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\mainmenustate.h 49
Error C2143 syntax error: missing ';' before '*' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\mainmenustate.h 49
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\mainmenustate.h 49
Error C2238 unexpected token(s) preceding ';' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\mainmenustate.h 49
Error C2143 syntax error: missing ';' before '*' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\mainmenustate.h 49
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\mainmenustate.h 49
Error C2238 unexpected token(s) preceding ';' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\mainmenustate.h 49
Error C2143 syntax error: missing ';' before '*' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\mainmenustate.h 49
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\mainmenustate.h 49
Error C2238 unexpected token(s) preceding ';' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\mainmenustate.h 49
Error C2143 syntax error: missing ';' before '*' SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\mainmenustate.h 49
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\mainmenustate.h 49[/spoiler]

And here's the Application.h :


#pragma once

#include "GameState.h"
#include "MainMenuState.h"
#include "GameplayState.h"
#include "Sprite.h"
#include "Text.h"
#include "Debug.h"
#include "Globals.h"
#include "GUIManager.h"
#include "Button.h"
#include "EntityManager.h"
#include "Random.h"

#include "Globals.h"

#include <string>
#include <iostream>
#include <vector>
#include <thread>

#include <SFML\Graphics.hpp>
#include <BOX2D\Box2D.h>
#include <TGUI\TGUI.hpp>

namespace SwEngine
{

	class Application
	{

	public:

		Application();

		~Application();

		void Run();

		void Close();

		void AddGamestate(std::string m_name, GameState* m_gamestate);

		void ChangeGamestate(int m_gamestate);

		void HandleGamestateEvents(float &m_deltaTime);

		void DrawGamestate(sf::RenderWindow &m_window);

		void DrawGUI();

		GameState* GetGamestate();


		sf::RenderWindow &GetWindow();

		sf::Event &GetEventHandler();

		void SetApplication(Application* m_app);

	private:

		Application* _application;

		sf::RenderWindow _window;

		sf::Event _evnt;

		sf::Clock _deltaClock;

		sf::View _view;

		sf::FloatRect _viewportRect;

		float _deltaTime;

		std::vector<GameState*> _gamestates;

		GameState* _currentGamestate;
		
		b2World* _world;


	};

}

And this is GameState.h :


#pragma once

#include <SFML\Graphics.hpp>
#include <iostream>
#include "Application.h"

namespace SwEngine
{

	class GameState
	{

	public:

		GameState(Application& m_app);

		GameState();

		~GameState();

		virtual void Update() = 0;

		virtual void Load();

		virtual void HandleEvents(float m_deltaTime) = 0;

		virtual void Draw(sf::RenderWindow &m_window) = 0;

		virtual void Quit() = 0;

		virtual std::string GetGamestateName() = 0;

	};

} 

I'm suing Visual Studio Community 2015 on a windows 10 computer.

Advertisement

Are these errors when you build, or errors produced by the Intellisense engine and displayed in the summary window or as red squiggles under the code before you build?

Might try and Clean Solution and Build.

Also, since we can't see AddGamestate, have you tried right clicking on the calling code and use Go To Definition" to confirm you are calling what you think you are calling?

"I can't believe I'm defending logic to a turing machine." - Kent Woolworth [Other Space]

Are these errors when you build, or errors produced by the Intellisense engine and displayed in the summary window or as red squiggles under the code before you build?

It's not a intellisense error, it's when I build it only.

Might try and Clean Solution and Build.

Also, since we can't see AddGamestate, have you tried right clicking on the calling code and use Go To Definition" to confirm you are calling what you think you are calling?

It displays a error which says "A defenition for the symbol '(null)' could not be located."

It's not a intellisense error, it's when I build it only.

You can generally trust the compiler that runs when you build to be accurate (as opposed to the compiler that runs -- yes, it is a different compiler -- to generate Intellisense). So as far as that compiler is seeing, you're calling the function with one parameter.

Possible explanations include not calling the function you think you are calling, and sending old source code (or source code you don't think you're sending) to the compiler. I'd vote the latter given your other notes about Intellisense and go-to-definition not working right. You likely have a messed up build environment for your project.

I sometimes(1-2 a year) that error occurs to me when there isn't a matching '}' to '{' it's pretty hard to hunt these down(especially if it is in a header).

If that's the case, I do a rebuild and try to figure out if the error is in a header or cpp. If it is in cpp it;s pretty easy just #if 0 half of the code and bisect it.
if it is in header I compile cpps one by one until i find a broken one and I start to exclude headers. Once the broken header is located I bisect the header for that error.

It's not a intellisense error, it's when I build it only.

You can generally trust the compiler that runs when you build to be accurate (as opposed to the compiler that runs -- yes, it is a different compiler -- to generate Intellisense). So as far as that compiler is seeing, you're calling the function with one parameter.

Possible explanations include not calling the function you think you are calling, and sending old source code (or source code you don't think you're sending) to the compiler. I'd vote the latter given your other notes about Intellisense and go-to-definition not working right. You likely have a messed up build environment for your project.

I haven't changed anything in my project except for source code though...? Or can it still be that?

Also, it does this to multiple variables as well, it says it isn't a variable even though it is.

I sometimes(1-2 a year) that error occurs to me when there isn't a matching '}' to '{' it's pretty hard to hunt these down(especially if it is in a header).

If that's the case, I do a rebuild and try to figure out if the error is in a header or cpp. If it is in cpp it;s pretty easy just #if 0 half of the code and bisect it.
if it is in header I compile cpps one by one until i find a broken one and I start to exclude headers. Once the broken header is located I bisect the header for that error.

I guess I'll have to check all of the files "related" to the errors then. :/

I guess I'll have to check all of the files "related" to the errors then. :/

You might post more of the errors (I know you said 158 of them). The other errors might be more telling.

"I can't believe I'm defending logic to a turing machine." - Kent Woolworth [Other Space]

I guess I'll have to check all of the files "related" to the errors then. :/

You might post more of the errors (I know you said 158 of them). The other errors might be more telling.

Added a list of all the errors to the post, quite a lot of them... lol

Just a brief skim, these ones are interesting to me.


Error C2535 'SwEngine::GameplayState::GameplayState(void)': member function already defined or declared SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 19
Error C2535 'SwEngine::GameplayState::GameplayState(void)': member function already defined or declared SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 19
Error C2535 'SwEngine::GameplayState::GameplayState(void)': member function already defined or declared SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 19
Error C2535 'SwEngine::GameplayState::GameplayState(void)': member function already defined or declared SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 19
Error C2535 'SwEngine::GameplayState::GameplayState(void)': member function already defined or declared SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 19
Error C2535 'SwEngine::GameplayState::GameplayState(void)': member function already defined or declared SwEngine c:\users\alex\documents\visual studio 2015\projects\swengine\swengine\src\gameplaystate.h 19

This suggests that either you've got two files defining the same thing (might not be included in the project, but something might include an old file that is still in the file structure). Or I wonder if you've got bad header guards or missing #pragma once or a circular reference somewhere.

"I can't believe I'm defending logic to a turing machine." - Kent Woolworth [Other Space]

This topic is closed to new replies.

Advertisement