Compile & Run

 

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.cpp is the name of your program.
sudo g++ -o firstprogram firstprogram.cpp

How to run a C++ program

./firstprogram

Using 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

Introduction

  C++ C++ is a general purpose programming language that was develop as an enhancement of the C language to include object-oriented concept....