Compile & Run a C++ Program
How to compile a program in C++
- Open your terminal, navigate to the directory where you have saved your program. Consider
firstprogram.cppis the name of your program.
sudo g++ -o firstprogram firstprogram.cppHow to run a C++ program
./firstprogramUsing Onecompiler
- You don't need to install any software or compiler.
- Just goto OneCompiler and enjoy programming without any installation.
No comments:
Post a Comment