Jump to content
  • Advertisement
Sign in to follow this  
RideThePhoenix

Program Failing to recongnize

This topic is 3277 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

http://pastebin.com/d360dc856 - DRAWENGINE HEADER http://pastebin.com/m28675cc5 - GAME HEADER http://pastebin.com/m45701032 - SPRITE HEADER http://pastebin.com/m4a020acc - drawengine cpp http://pastebin.com/m28420177 - game cpp http://pastebin.com/m55231ee5 - SPRITE CPP 1>e:\languages\c++\module 1\projects\videos\game_project\game_project\sprite.cpp(83) : error C2065: 'drawArea' : undeclared identifier 1>e:\languages\c++\module 1\projects\videos\game_project\game_project\sprite.cpp(83) : error C2227: left of '->drawSprite' must point to class/struct/union/generic type Someone please help out!

Share this post


Link to post
Share on other sites
Advertisement
New error:

1>------ Build started: Project: Game_Project, Configuration: Debug Win32 ------
1>Compiling...
1>Sprite.cpp
1>e:\languages\c++\module 1\projects\videos\game_project\game_project\sprite.cpp(89) : error C2575: 'addLives' : only member functions and bases can be virtual
1>e:\languages\c++\module 1\projects\videos\game_project\game_project\sprite.cpp(89) : error C2084: function 'void addLives(int)' already has a body
1> e:\languages\c++\module 1\projects\videos\game_project\game_project\sprite.cpp(42) : see previous definition of 'addLives'
1>Build log was saved at "file://e:\Languages\C++\Module 1\Projects\Videos\Game_Project\Game_Project\Debug\BuildLog.htm"
1>Game_Project - 2 error(s), 0 warning(s)

Share this post


Link to post
Share on other sites
Half of your function definitions is missing the Sprite:: class in front of it:


void addLives(int num)
{
numLives += num;
}

void draw(float x, float y)
{
drawArea->drawSprite(spriteIndex,(int) x, (int) y);
}

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!