how to run cpp file in terminal windows code example
Example 1: how to compile and run cpp code in terminal
# compile cpp_code.cpp
g++ cpp_code.cpp
# run compiled file
./a.out
Example 2: c++ compile to exe command line
gcc sourcefile_name.c -o outputfile.exe