コーディングIDE:Microsoft Visual C ++ 6.0
次のコード:
#include
#include
int main()
{
int i;
for(i=0; i<7; i++)
{
int j;
for(j=0; j<5; j++)
{
if(i==0 || i==6)
{
//print *****
if(j<4)
{
printf("*");
}
else if(j==4)
{
printf("*\n");
}
}
else
{
if(j==0)
printf("*");
else if(j==4)
{
printf("*\n");
}
}
}
}
return 0;
}
このエラーメッセージを生成します。
error C2143: syntax error : missing ';' before 'type'
error C2065: 'i' : undeclared identifier
I just don't know the reason why it gives me this kind of error msg. It suppose to be an easy for loop - for (int i=0; i<10; i++){}
but it just doesn't work and gives me this kind of error msg.