我现在正在youtube上关注一个由thenewboston创建的教程。我没有一字一句地理解它,但已经足够接近了。
我的简单程序:
#include <iostream>
#include <string.h> /* memset */
#include <unistd.h> /* close */
#include <stdio.h>
#include <stdlib.h>
#include <cstdlib>
int main(){
using namespace std;
cout << "Those who wander too far off the path of reality. Will be plunged into total Madness." << endl;
cout << " - BinKill-Ethical" << endl;
system("cls");
return 0;
}
这是我用C++创建的第一个程序。我几乎一无所知,但是我不能让system()函数工作。
输出:
除了#include <iostream>
之外,所有的都是来自其他stackoverflow帖子的建议,试图让它正常工作。没有一个是有效的。我正在使用G++进行编译,如果这很重要的话。
https://stackoverflow.com/questions/21105171
复制相似问题