woodelv at February 6th, 2014 12:26 — #1
Hi, i'm new to this forum and i apologize in advance if this is in the wrong topic or something like that...
I've been checking out the C++ totorials by NHTV -> IGAD on this website (http://devmaster.net/posts/2844/introduction-to-c-with-game-development-part-2-project-template)
But in the second tutorial i'm stuck with the assignment. It says that you have to create a code that will draw IGAD, when i type my interpretation of the lines of code:
m_Surface->Line( 80, 60, 80, 420, 0xffffff); (This is one exemplary line, i have 13 others that are in fact just the same, except for the parameters) I get the following error: 1>c:\my_projects\template\game.cpp(28) : error C2065: 'm_Surface' : undeclared identifier 1>c:\my_projects\template\game.cpp(28) : error C2227: left of '->Line' must point to class/struct/union/generic type 1> type is ''unknown-type'' Since I've only been doing C++ for two hours, this is kinda overwhelming. Can anybody help me out?
Kind regards, Tim
woodelv at February 6th, 2014 12:31 — #2
It does help if i change m_Surface to m_Screen, but I find this quite weird since the tutorial states that it should be m_surface
rouncer at February 7th, 2014 02:32 — #3
are you sure you are fully linked and included?
reedbeta at February 7th, 2014 02:42 — #4
It's saying that it can't find the variable called
m_Surface, which should be available inside any of the
Game::Blabla functions. Does the tutorial compile and run ok before you started modifying it for the assignment? If so, can you post all your changes?