#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