Fundamentals of C++ that help Students

Posted by Alan Jake
10
Sep 30, 2019
356 Views
Basic Concepts of C++
In this section we will cover the basics of C++ help for students, it will include the syntax, variable, operators, loop types, pointers, references and information about other requirements of a C++ program. You will come across lot of terms that you have already studied in C language.

Syntax and Structure of C++ program
Here we will discuss one simple and basic C++ program to print "Hello this is C++" and its structure in parts with details and uses.

First C++ program

#include <iostream.h>
using namespace std;
int main()
{
cout << "Hello this is C++";
}

Header files are included at the beginning just like in C program. Here iostream is a header file which provides us with input & output streams. Header files contained predeclared function libraries, which can be used by users for their ease.

Using namespace std, tells the compiler to use standard namespace. Namespace collects identifiers used for class, object and variables. Namespace can be used by two ways in a program, either by the use of using statement at the beginning, like we did in above mentioned program or by using name of namespace as prefix before the identifier with scope resolution (::) operator.

Comments (1)
avatar
Jenny Ray
3

Best SEO Services India, SMO Company India, Digita

avatar
Please sign in to add comment.