Skip to content

Latest commit

 

History

History
17 lines (16 loc) · 733 Bytes

log.md

File metadata and controls

17 lines (16 loc) · 733 Bytes

Run C++ program on terminal using gcc compiler.

  1. Open linux terminal/ WSL cmd
  2. install gcc
    1. $ sudo apt-get install build-essential
  3. Now go to that folder where you will create C++ programs
    1. $ sudo gedit hello.cpp
  4. Add the code in the file.
  5. Save the file and exit.
  6. Compile the program using any of the following command
    1. $ sudo g++ hello.cpp (or)
    2. $ sudo g++ hello.cpp -o hello
  7. To run this program type this command
    1. $ ./a.out (If you compiled using first command) (or)
    2. $ ./hello (If you compiled using second command)
  8. Output image