C++ tutorial-C++ compile and run programs


Compiling and Running your program


To compile the C++ program, you will follow the steps below.

- Save your first hello world program as helloworld.cpp in C:\Myfile

- Open command prompt-->enter C:\Myfile and type bcc32 helloworld.cpp

If you don’t see any errors, it means that you end up with an executable file called helloworld.exe and you can run it to display the output message “Hello World”.

Hello world program in C++  

If you are using Dev-C++ editor, you will press Ctrl+F9 to compile the program. If the compilation completes without any error, you can press Ctrl+F10 to run the program.


Comments




This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages:
C, C++, C#, Java, VB.NET, Python, VBA,PHP & Mysql, SQL, JSP, ASP.NET,HTML, CSS, JQuery, JavaScript and other applications such as MS Excel, MS Access, and MS Word. However, we don't guarantee all things of the web are accurate. If you find any error, please report it then we will take actions to correct it as soon as possible.