因为上机考试指定 vs2010 c 一开始没有认真对待,用的vs2013和codeblocks,但是后来没事用vs2010,发现很多规则都不一样,我吧自己遇到的问题记录下来,仅供参考:
1.
int a[]={1,2,3};
for(int i=0;i<3;i++)
{
printf("%d",a[i]);
}
1>e:c programtrytrytry.c(6): error C2143: syntax error : missing ';' before 'type'
1>e:c programtrytrytry.c(6): error C2065: 'i' : undeclared identifier
1>e:c programtrytrytry.c(6): warning C4552: '<' : operator has no effect; expected operator with side-effect
1>e:c programtrytrytry.c(6): error C2065: 'i' : undeclared identifier
1>e:c programtrytrytry.c(6): error C2059: syntax error : ')'
1>e:c programtrytrytry.c(7): error C2143: syntax error : missing ';' before '{'
1>e:c programtrytrytry.c(8): error C2065: 'i' : und