Computer Science, asked by Soumallaya, 5 months ago

how to compile a c++ program? (key)​

Answers

Answered by nidhiparashar22392
0

Answer:

Run a C/C++ program on terminal using gcc compiler

Open terminal.

Type command to install gcc or g++ complier:

Now go to that folder where you will create C/C++ programs. ...

Open a file using any editor.

Add this code in the file: ...

Save the file and exit.

Compile the program using any of the following command: ...

To run this program type this command:

Explanation:

To compile the program, type g++ hello. cpp -o hello ( g++ filename. cpp -o hello ) and press Enter. This will create an executable file with name 'hello' ( you can give any other name also but you will have to execute the file with that name only ).

Language paradigms: Object-oriented

Similar questions