how to execute c++ program in cmd

C++
g++ filename.cpp -o filename.exe
Source

Also in C++: