Writing a hello world C++ program in linux is easy. Here are the step
- Create a file with cpp extension. Let’s call it program.cpp
- write some code in the file we created in previous step
- compile, build and link
- Run the program
#include <iostream>
using namespace std;
int main ()
{
cout << "Hello World! ";
cout << "I'm a C++ program";
return 0;
}
Code language: PHP (php)