HOW TO COMPILE A C++ PROGRAM ON REPLIT The green RUN button compiles a C++ program with a standard compiler name clang. To use the g++ compiler. Place your program in a new directory (or folder). You can create subdirectory of the current directory with mkdir mydirectory where mkdir is a UNIX command and mydirectory is the new directory's name Place your .cpp file in this directory mv myprogram.cpp mydirectory/myprogram.cpp cd mydirectory The top of your .cpp file should include #include #include using namespace std; Compile with g++ myprogram.cpp -o myprogram If you have multiple .cpp files in your program, you can compile/link them together with: g++ file1.cpp file2.cpp file3.c file4.cpp -o myprogram Execute with ./myprogram