C++幫幫手~~

2008-07-03 3:59 am
我打咗個C++ 的hello world

打得冇錯

但佢一run就自動關咗

幫幫手啦

=========我打個hello world=========

#include <iostream>
using namespace std;
int main() {
cout << "Hello! World!\n";
cout << "哈囉! C++!\n";
return 0;
}
更新1:

咩係dos????

回答 (3)

2008-07-03 10:16 am
✔ 最佳答案
Run the program from Command Prompt window (DOS window). Do not run from Windows environment because it is a console program, not a Windows program.
2008-07-18 3:58 am
Start-->run-->cmd-->type your file path
2008-07-03 5:32 pm
跟前面那位說的一樣,在DOS PROMPT中執行就可以。
但你也可以加入pause來停止自動關閉執行window.

#include
using namespace std;
int main() {
cout << "Hello! World!\n";
cout << "哈囉! C++!\n";
system("PAUSE");
return 0;
}

ok?


收錄日期: 2021-04-25 20:33:06
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20080702000051KK02625

檢視 Wayback Machine 備份