/cpp

C++

Primary LanguageC++

C++

TLU C++ course

Materials // course reference

Compiling C++

gcc -o <output> <input>
// or
g++ -o <output> <input>
gcc -o hello.out hello.cpp
// or
g++ -o hello.out hello.cpp

Difference between g++ and gcc

g++

g++ can compile any .c or .cpp files but they will be treated as C++ files only.

gcc

gcc can compile any .c or .cpp files but they will be treated as C and C++ respectively.