c语言中为什么在分号后面可以有n个分号
c语言中为什么在分号后面可以有n个分号
这个现象我偶然发现为什么第一个cout可以执行可第二个却不能呢
#include<iostream.h>
void main()
{
cout<<"ok"<<endl;;;;;;;;;;;;;;;;;;
cout<<"ok"<<endl;aaaaaaaaaaaaaaaaaaaaaaaaa
}
错误如下:
--------------------Configuration: 分号后面 - Win32 Debug--------------------
Compiling...
分号后面.cpp
C:\Documents and Settings\分号后面.cpp(8) : error C2065: 'aaaaaaaaaaaaaaaaaaaaaaaaa' : undeclared identifier
C:\Documents and Settings\分号后面.cpp(8) : error C2143: syntax error : missing ';' before '}'
Error executing cl.exe.
分号后面.exe - 2 error(s), 0 warning(s)