Hello World的程序可以這樣寫嗎?
#include<stdio.h> #include<stdlib.h> main() { ????printf("Hello?World"); ????system("PAUSE"); } 請問可以這樣嗎,我從書上看到的?
#include<stdio.h> #include<stdlib.h> main() { ????printf("Hello?World"); ????system("PAUSE"); } 請問可以這樣嗎,我從書上看到的?
2016-07-22
舉報
2016-07-22
?<stdlib> 頭文件里包含了C、C++語言的最常用的系統函數
?system就是調用從程序中調用系統命令(和shell命令)。 ?
?system("pause")就是從程序里調用“pause”命令; ?
?而“pause”這個系統命令的功能很簡單,就是在命令行上輸出一行類似于“Press ? any ? key ? to ? exit”的字,等待用戶按一個鍵,然后返回。
2016-07-22
不可以吧,你可以敲代碼試試,提示有非法字符。