part 12 is something I think I am not able to solve. My code was this:
// Template, major revision 3
// IGAD/NHTV - Jacco Bikker - 2006-2009
#include "string.h"
#include "surface.h"
#include "stdlib.h"
#include "template.h"
#include "game.h"
using namespace Tmpl8;
class Tank
{
public:
Tank()
{
x = 0;
y = 4 * 64;
rotation = 0;
}
void Move( Surface* a_Screen)
{
x++;
if ( x > ( 16 * 64 ) ) x = 0;
tank.Draw( x, y, a_Screen );
}
int x, y, rotation;
};
Tank mytank;
void Game::Init()
{
}
void Game::Tick( float a_DT )
{
mytank.Move( m_Screen );
}
The errors I got:
1>c:\-\part12\game.cpp(25) : error C2065: 'tank' : undeclared identifier
1>c:\-\part12\game.cpp(25) : error C2228: left of '.Draw' must have class/struct/union
I thought it was weird, since this is exactly what was written in the tutorial. Luckily, I thought I understood the problem, so I
changed 'tank.Draw' to 'Tank.Draw'. Unfortunately, this gave me these errors (both the same?):
1>c:\-\part12\game.cpp(25) : error C2143: syntax error : missing ';' before '.'
1>c:\-\part12\game.cpp(25) : error C2143: syntax error : missing ';' before '.'
This is where I got stuck..does anyone know how to solve this problem?
Rimevan













