#include <iostream>
int main()
{
using namespace std;
cout<<"Hello!";
cout<<endl;
cin.get();
return 0;
}
就是运行之后直接就跳到下一行了。
#include <iostream>
int main()
{
using namespace std;
cout<<"Hello!";
cout<<endl;
cin.get();
return 0;
}
g++ hello.cpp只是编译成exe了。没有错误自然啥都不显示。没有指定生成文件名会默认生成a.exe。你输入a运行一下
可以通过-v参数显示编译过程
g++ -v hello.cpp