Page 1 of 1

printf after main and SYS_SystemHandle not recognized anymor

Posted: Fri Feb 12, 2010 5:58 am
by modelAnimator
Hye.
Aftercopiling succesfully in VS2008,i added a simple printf :
int main(int argc, char **argv)
{
printf( "Starting BLENDER.. ");
SYS_SystemHandle syshandle;

and got compiling error :
error C2275: 'SYS_SystemHandle'


:?:

no more compiling error when moving line !

Posted: Fri Feb 12, 2010 10:08 am
by modelAnimator
I move the printf line two lines under, and it works :D
Why :?:

Re: no more compiling error when moving line !

Posted: Wed Feb 17, 2010 1:41 pm
by bjornmose
modelAnimator wrote:I move the printf line two lines under, and it works :D
Why :?:
In .C files all variable declarations must be at the beginning of the scope.
In .CPP files variable declarations are allowed on the fly.