[問題] Declaration syntax error in funtion main{}

看板C_and_CPP (C/C++)作者 (Maria)時間16年前 (2009/05/16 20:39), 編輯推噓0(002)
留言2則, 2人參與, 最新討論串1/1
錯誤訊息: 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

05/16 20:45, , 1F
char stm[] = "******" 後面沒有分號??
05/16 20:45, 1F

05/16 21:07, , 2F
真的耶...謝謝妳/你^^ 新手多多包含^^
05/16 21:07, 2F
文章代碼(AID): #1A3hG5BX (C_and_CPP)
文章代碼(AID): #1A3hG5BX (C_and_CPP)