TEA BREAK WITH C++: Opening a New File and printing famous “HELLO WORLD”

Bookmark

No account yet? Register

NOTE: You may download codes and extra source material for this book from https://bookofengineering.com/easyseries/

You can start a new file by selecting; 

File > New > Source File OR pression Ctrl + N on your keyboard; 

Then it will open a place where you can write your code; 

You can write the below code or copy paste from the examples file from the course materials located at; bookofengineering.com/easycpp/helloworld.cpp;  

  1. //my first c++ program
  2. #include <iostream>
  3. using namespace std; 
  4. int main(){
  5. cout<<“hello world!”;
  6. return 0;
  7. system(“pause”);
  8. }

 And then click compile and run OR use F11 which is faster; 

Then it will ask you to save the file first. You can save with a name you want. Then save. 

After that DevC++ will check your code against errors and here it is your first code; 

Yes, all the written things are to print only “hello world!” on screen and it is beautiful isn’t it? You can really control your PC now. Congrats! You did it. 

NOTE: You may buy this course in paperbook book format from https://www.amazon.com/dp/B0892HQTGS

FavoriteLoadingAdd to favorites
Spread the love

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.