作者apple9139 (Maria)
看板C_and_CPP
标题[问题] Declaration syntax error in funtion main{}
时间Sat May 16 20:39:32 2009
错误讯息:
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
Ex2_01.cpp:
Error E2141 Ex2_01.cpp 9: Declaration syntax error in function main()
Warning W8004 Ex2_01.cpp 16: 'stm' is assigned a value that is never used in function main()
*** 1 errors in Compile ***
程式码:
//储存名称:D:\Borland\C++02\Ex2_01.cpp
#include <iostream.h>
void main(void)
{
char stm[] = "******"
cout << stm << endl
<< stm << endl
<< stm << endl
<< stm << endl
<< stm << endl
<< stm << endl
<< stm << endl;
}
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 59.115.233.20
1F:→ sprinter:char stm[] = "******" 後面没有分号?? 05/16 20:45
2F:→ apple9139:真的耶...谢谢你/你^^ 新手多多包含^^ 05/16 21:07