In order to build/compile a C++ file (files with extension .cpp for example) you need a C++ compiler. While on Linux you can use GNU GCC, which actually is a container for several compilers. GCC selects the correct compiler based on the extension of the files you try to compile. Yes there exist other compilers (and containers), but this one is free, well-known and almost always directly available on Linux systems. The exact syntax for compiling depends on what you exactly want to do. You could for instance want to compile the C++ file into an executable by:
gcc filename.cpp -o executablename
This command compiles your C++ file named "filename" into an executable named "executablename". For a basic tutorial have a look at:
http://pages.cs.wisc.edu/~beechung/ref/gcc-intro.htmlFor some basic information on flags have a look at:
http://users.encs.concordia.ca/~mokhov/comp444/tutorials/gcc.pdf