Problem scenario
You want to install a C++ compiler in Ubuntu. You want to write a basic C++ program and run it. How do you do these things?
Solution
1. As root, install a C++ compiler with this command:
apt install g++
2. Create a basic program. Here is an example. Name this file hello.cpp and put this as the content:
#include <iostream>
…
Continue reading “Using Ubuntu, How Do You Install a C++ Compiler and Run a Basic C++ Program?”