KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
So I have been having this extremely frustrating problem lately with Visual C++ 2012. Up until a few hours ago, I was writing code just fine and everything was working as intended, until I decided to optimize some things and deleted a few classes. I fixed all of the errors that were popping up because of that, e.g. false includes, etc. Unfortunately, after this the VS compiler went crazy. It started giving me errors such as: Error 14 error C2653: 'Class' : is not a class or namespace name or even Error 5 error C2143: syntax error : missing ';' before '}' Error 4 error C2059: syntax error : '>' I've checked multiple times, and everything is in it's right place: all headers included, all symbols placed where they should be. As far as I understand, the problem is not with my code but with the compiler itself... Visual Studio can be really annoying at times, I guess. Anyway, I would really be grateful if someone could help me out on this one. (By the way, disabling precompiled headers did not work) Relevant parts of code: Error 14: #include "PlayerEntity.h" PlayerEntity::PlayerEntity(void) {} // This line causes the error Error 5: class GameScreen : public BaseScreen { public: ... private: ... }; // This line causes the error Error 4: private: std::vector<BaseEntity*> _EntityList; // This line causes the error Whole PlayerEntity.h file: #ifndef PENTITY_H #define PENTITY_H #include "BaseEntity.h" class PlayerEntity : public BaseEntity { public: PlayerEntity(void); PlayerEntity(float, float); virtual ~PlayerEntity(void); void render(sf::RenderWindow&); void update(); private: void init(); }; #endif Whole GameScreen.h file: #ifndef GSCREEN_H #define GSCREEN_H
Tags (comma-separated)
Save Edits
Cancel