Ubuntu/Linux Mint like most other Linux distributions by default comes with GCC pre-installed (The GNU Compiler Collection). So, you can directly write code in C/C++ and compile it from the Terminal.
However, when using GCC, you may see errors during the compilation of C/C++ programs that look something like this.
There is an easy fix for this. Install the build-essential package that has the required libraries.
Here is how:
Open Terminal and type in:
sudo apt install build-essential
Type Y to proceed with the installation of essential GCC build and development libraries.
After it is installed, you can try compiling the C/C++ code.
The compilation error would be fixed, so you can then execute the program.
Happy compiling.