编写:
vim hello.cpp
#include <iostream>
using namespace std;
int main()
{
cout << "Hello World!" << endl;
return 0;
}
:wq
编译:
g++ hello.cpp -o hello
运行:
./hello
结果输出:
Hello World!
编写:
vim hello.cpp
#include <iostream>
using namespace std;
int main()
{
cout << "Hello World!" << endl;
return 0;
}
:wq
编译:
g++ hello.cpp -o hello
运行:
./hello
结果输出:
Hello World!