Setup development tools to code C and C++
Use MinGW to install C and C++ compilers
- Install MinGW Installation Manager
- Choose install location:
C:\MinGW - Go to:
Edit the system environment variables - Add to System => Path:
C:\MinGW\bin\
Open MinGW and install the following packages in Basic Setup
- mingw32-base-bin
- mingw32-gcc-g++-bin
- msys-base-bin
Just run the following
sudo apt-get install gcc g++ make -y- Install Docker
- Change the file you want to run inside
Dockerfileand run the following
docker build -t cpp .
docker run --rm -it cppgcc hello.c # c
g++ hello.cpp # c++./a.out # Linux and MacOS
start a.exe # Windows