I am using Visual C++ 2005 with SP1
why does the following code generate a compiler error (error C2062: type 'int' unexpected)?
for(int i=0,int j=0;i<5;i++,j++){}
Note the following two variations generate no compile error
int i,j;
for(i=0,j=0;i<5;i++,j++){}
int j;
for(int i=0,j=0;i<5;i++,j++){}
Is this just a bug in the Visual C++ compiler or is this the way the standard is defined?
Thanks.