I am using Visual C++ 2010 express edition and i am making classes but when i run i get the error:
1>c:\documents and settings\louisa\my documents\visual studio 2010\projects\ninja wars\ninja wars\game.cpp(71): error C2065: 'm_pScreen' : undeclared identifier

In my Game.cpp i have this code
void Game::Draw()
{
	Sprite::Draw(m_pScreen, testSprite, 0, 0);
	Sprite::Draw(m_pScreen, testSprite, 300, 300, 0, 0, 50, 50);

}

And i have been told to add:
When testing the function in Game::Draw() add SDL_Flip(m_pScreen);

In my game.h i have
Game();
                         
						void Init(const char* title, int width, int height, 
                                  int bpp, bool fullscreen);

                          
						  bool Running() {return m_bRunning;}

                          void HandleEvents(Game* game);
                           
                          void Update();
                           
			 void Draw();

                          void Clean();

can anyone see where i can add it where it fixes the error.

The error message is clear: 'm_pScreen' : undeclared identifier tells you that you have tried to use an identifier m_pScreen and that identifier is not declared in the scope that is in effect at line 71. Judging from the horrible Hungarian notation name, it should be a member of the Game class which is a pointer to a Screen. Presumably you didn't declare this member in the Game class declaration (and so, probably, you also didn't initialize it in the constructor).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.