I have started to follow Chili’s beginner programming tutorial and I got as far to lesson 12 before I got an error that I can’t fix and if someone could help me I would be so grateful.
The error is in the ”void Game::ComposeFrame” part and only there.
The error: 1>..\Assets\Game.cpp(231): error C2065: 'ix' : undeclared identifier
Please help me.
Beginner C++ : Lesson 12 need help
Re: Beginner C++ : Lesson 12 need help
It means you haven't declared 'ix'... eg. "int ix;"
If you can't get it working post the full function ( which in this case seems to be enough ).
If you can't get it working post the full function ( which in this case seems to be enough ).
ʕ •ᴥ•ʔ
-
- Posts: 3
- Joined: April 29th, 2013, 11:49 am
Re: Beginner C++ : Lesson 12 need help
Okey it did not work so here is the full function
for( int iy = 0; iy < 3; iy++ )
{
for( int ix = 0; ix < 3; ix++ );
{
if( GetSquareState( ix,iy ) == X )
{
DrawX( baseX + ix * squareSize,baseY + iy * squareSize );
}
else if( GetSquareState( ix,iy ) == O )
{
DrawO( baseX + ix * squareSize,baseY + iy * squareSize );
}
}
}
for( int iy = 0; iy < 3; iy++ )
{
for( int ix = 0; ix < 3; ix++ );
{
if( GetSquareState( ix,iy ) == X )
{
DrawX( baseX + ix * squareSize,baseY + iy * squareSize );
}
else if( GetSquareState( ix,iy ) == O )
{
DrawO( baseX + ix * squareSize,baseY + iy * squareSize );
}
}
}
Re: Beginner C++ : Lesson 12 need help
"for( int ix = 0; ix < 3; ix++ );" spot the mistake...
ʕ •ᴥ•ʔ
-
- Posts: 3
- Joined: April 29th, 2013, 11:49 am
Re: Beginner C++ : Lesson 12 need help
I think I'll kill myself now...