C++ Programming Tips

First thing you’re going to learn in upcoming C++ tutorials, its how to make simple calls. normally in all programming classes i have seen both online and in real class, they normally start with this simple process of printing out “Hello World”, but in my own tutorial, we’re going to skip that and make something unique but still simple…C++ is a High Level Language and with this, it can be used to control some computer processes.
A simple Example of a C++ Syntax below


//Sample cpp
// simple addition in c++
#include <iostream>
using namespace std;
int main()
{
    int a;
    int b;
    int sum;

    cout << "Enter values to sum two numbers?" << endl;
    cout <<"enter first value \n";     cin>> a;
    cout <<"enter  second value \n";     cin>> b;
    sum = a+b;
    cout <<"The sum of values is " << sum << endl;

    return 0;
}

The double back slashes ( “//” are single comment line) used to indicate or remind the creator of what was there before or what needs to be done, the first three lines after the comment lines are mandatory syntax to begin any C++ coding just as you have to include this line of code “<?php echo $something; “?>” when declaring the php syntax, the opening tag ” < ” plus a question mark is needed E.g (< ?) and a question mark and a closing tag " > E.g (?>) is require fo the php syntax to work properly. The Extension for C++ is dot cpp(.cpp), a compiler is needed to execute any c++ codes, so to begin any tutorial on c++, you must first get a compiler. there are some online that are available such as Code-Block Compiler, its Free.

0

About Charming Prince

Being a Web Developer/Web Author, i had an idea to disseminate my knowledge in the field of web development to other people by opening this online free tutorials on programming languages, in so doing, to share ideas where applicable...As well as to share ideas in related area pertaining to information dissemination and media such as Movies, Music , and Games. as per these are the areas which i like the most and i think most people do like this area as well, so I'll try to make my explanation short but concise...
This entry was posted in Programming and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar Custom avatar