LEARN PROGRAMMING |C++| BASIC CONCEPTS|LESSON #1|

in #codecamp9 years ago (edited)

WHAT IS C++ ?

C++ is a general-purpose programming language used to create computer programs. Anything from art applications, music players ,operating systems and even video games!



TOOLS YOU'LL NEED


  • An IDE (Integrated development environment ) .I suggest using Visual Studio , it's easy to use and user friendly .



MAKING YOUR FIRST C++ PROGRAM

  • A C++ Program is a collection of comands which tell the computer "do something" like this one :


#include <iostream>
using namespace std;
int main()
{
  cout << "Hello world!";
  return 0;
}

This code tells the computer to output "Hello world " when you execute it .

  • Let's see what every line of code does :


>  #include <iostream>
  • C++ need some headers to run propery . <iostream>is a header ,it defines the standard stream objects that inputs and outputs data .

  • #includeTells the program to include the header , in our case to include <iostream>

using namespace std;

  • in this code , using namespace std; tells the compiler to use standard namespaces , std comes from standard .

int main()
{
  cout << "Hello world!";
  return 0;
}
  • { } curly brakets indicates the front and end of a function ( int main())

  • main() is a function . All programs begins with the main function ,no matter the program .

  • cout << "Hello world!"; is a statement . Statement are expresion that can produce effect . It's the chocolate in the cake , the water from cofee , the meat from your bones . In this case , this line will output "hello world " on your screen after you execute the program .

  • return 0; this is the return statement .It's used to close, terminate the function .

This completes today lesson , remember i am learning as you read , so i may have done some mistakes . Follow for tomorow's next lesson . Have a great night . I will post the lessons under tag #codecamp .

information colected from sololearn
programming-motherfucker.jpg

Sort:  

This is great. I want to learn!

I will post next lesson tomorow , so stay tuned .

Interesting post 🙂
Quick question, are you a professional programmer or a programming student?

No , i finished mechanics , now i 'm doing my master degree in robotics . I'm just learning c++ , and decided it will be fun to share with you .

Congratulations @fishmon! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of comments

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!

Coin Marketplace

STEEM 0.04
TRX 0.33
JST 0.080
BTC 61714.34
ETH 1618.58
USDT 1.00
SBD 0.40