gcc g++

gcc is for compiling "c" source code,  gcc also can use for c++ source code

and g++ is for compiling "c++" source code.

"g++" will automatically link the code with the C++ runtime library (libstdc++),

 but you must include it manually if you use "gcc" for c++ source code.

原文地址:https://www.cnblogs.com/greencolor/p/1683550.html