Showing posts with label Programming. Show all posts
Showing posts with label Programming. Show all posts

Thursday, 18 June 2020

Writing first program in C++ using Code::Blocks


Writing a C++ program to display ‘Hello World!’ output.

Friends, this is expected that you have already set the C++ environment and you have your compiler ready to start the coding.

I am using Code::Blocks version 20.03 and mingw-w64 while writing this article.


Download URLs:

Code::Blocks: http://www.codeblocks.org/downloads

mingw-w64: http://mingw-w64.org/doku.php/download


Steps:

Launch Code::Blocks console


Go to File menu > Click on New > Click on Project…


Select Console Application > Click on Go


Click Next


Select C++ > Click Next


Feed in all the details as per you preferences > Click Next


Set the compiler to GNU GCC Compiler > Click Finish


Now your first program file is added to your Workplace


Click and Select main.cpp > Double Click on main.cpp > The default 1st program will be automatically created for you as shown in the screenshot below:


Click on Build and Compile button to see the output of the program


On successful build and run, the program output will be appearing like this


Cheers, Please write me back if you have any query of feedback.