1.运行.c
2.使用 gcc test.c -o test 和 ./test 编译生成文件并运行。
2.运行c++
新建 demo.cpp
#include <iostream>
using namespace std;
int main()
{
cout << "hello world " << endl;
return 0;
}
编译 g++ demo.cpp -o demo
./demo
1.运行.c
2.使用 gcc test.c -o test 和 ./test 编译生成文件并运行。
2.运行c++
新建 demo.cpp
#include <iostream>
using namespace std;
int main()
{
cout << "hello world " << endl;
return 0;
}
编译 g++ demo.cpp -o demo
./demo