Customizable training materials to learn C++

Looking for C++ Tutorial Visit Nano teach c++!
  • C++ Introduction
    15/07/2014 - 0 Comments
    C++ is a multi-paradigm programming language that supports object oriented programming (OOP), created by BJarne Stroustrup in 1983 at Bell Labs, C++ is an extension (superset)…
  • C++ Data Types
    11/07/2014 - 0 Comments
    Data types in any of the language means that what are the various type of data the variables can have in that particular language. Information is stored in a computer memory…
Nano teach C++ found result for your search here:

C++ Tutorial

This tutorial series will help you to get started in C++ to develop system applications.   C++ Example: /* * File: main.cpp * Author: Nano * Just click image to copy & paste */ (adsbygoogle = window.adsbygoogle || []).push({}); #include <iostream> int main() { std::cout<<"This is my first c++ Program."; std::cout<<std::endl<<"and its very easy"; }...
Read More »

C++ Introduction

C++ is a multi-paradigm programming language that supports object oriented programming (OOP), created by BJarne Stroustrup in 1983 at Bell Labs, C++ is an extension (superset) of C programming and the programs written in C language can run in C++ compilers. The development of C++ actually began four years before its release, in 1979. It did not start out with the name C++; its first name was C with Classes. In the late part of 1983, C with Classes was first used for AT&T’s internal programming needs. Its name was changed to C++ later in the same year. C++ was not released commercially...
Read More »

C++ Installation

To start learning C++ programming, you only need to install the C++ compiler in your System. What is a Compiler? A compiler is a computer program that transforms human readable (programming language) source code into another computer language (binary) code. This tutorial is written for Windows, Unix / Linux and MAC users. All code has been tested and it works correctly on all three operating systems. C++ Compiler Installation on Windows To use C++ compiler in Windows, you can install any one software mentioned below. You can download a 90-day trial version of Visual Studio You can download...
Read More »

C++ Program Structure

This tutorial will explain you about the C++ program structure. Basically a C++ program involves the following section. Documentations Preprocessor Statements Global Declarations The main() function Local Declarations Program Statements & Expressions User Defined Functions Here is a simple program which outputs a line of text. Example: (adsbygoogle = window.adsbygoogle || []).push({}); /* * File: main.cpp * Author: Gautam * Created on October 16, 2011, 4:09 PM */ #include <iostream> int main() { std::cout<<"This is my first c++ Program."; ...
Read More »

C++ Manipulators

Manipulators are operators used in C++ for formatting output. The data is manipulated by the programmer’s choice of display. Some of the more commonly used manipulators are provided here below: endl Manipulator endl is the line feed operator in C++. It acts as a stream manipulator whose purpose is to feed the whole line and then point the cursor to the beginning of the next line. We can use \n (\n is an escape sequence) instead of endl for the same purpose. setw Manipulator This...
Read More »

C++ Data Types

Data types in any of the language means that what are the various type of data the variables can have in that particular language. Information is stored in a computer memory with different data types. Whenever a variable is declared it becomes necessary to define data type that what will be the type of data that variable can hold. Data Types available in C++ are: Primary Data Type character, integer, floating point, boolean, double floating point, void, wide character Additional...
Read More »

C++ Variables

In C++ Programming language variable is used to store data in memory location. Rules of Declaring variables in C++ Variable name can consist of Capital letters A-Z, lowercase letters a-z, digits 0-9, and the underscore character. The first character must be a letter or underscore. Blank spaces cannot be used in variable names. Special characters like #, $ are not allowed. C++ keywords can not be used as variable names. Variable names are case sensitive. A variable name can be consist...
Read More »

C++ Keywords

The C + + Keywords must be in your information because you can not use them as variable name. C++ Keywords List You can’t use below mentioned keyword as identifier in your C++ programs. asm else new this auto enum operator throw bool explicit private true break export protected try case extern public typedef catch false register typeid char float reinterpret_cast typename class for return union const friend short unsigned const_cast goto signed using continue if...
Read More »

C++ Objects and Classes

In object-oriented programming languages like C++, the data and functions (procedures to manipulate the data) are bundled together as a self-contained unit called an object. A class is an extended concept similar to that of structure in C programming language; this class describes the data properties alone. In C++ programming language, class describes both the properties (data) and behaviors (functions) of objects. Classes are not objects, but they are used to instantiate objects. What is a class ? A class is an abstract data type similar to ‘C‘ structure. Class representation of objects...
Read More »

C++ Inheritance

One of the most important concepts in object-oriented programming is that of inheritance. Inheritance is a mechanism of reusing and extending existing classes without modifying them, thus producing hierarchical relationships between them and provides an opportunity to reuse the code functionality and fast implementation time. When creating a class, instead of writing completely new data members and member functions, programmer can designate that the new class should inherit the members of an existing class. This existing class is called the base class, and the new class is referred to...
Read More »

C++ Friend Function

In C++ a function or an entire class may be declared to be a friend of another class or function. Friend function can also be used for function overloading. Friend function declaration can appear anywhere in the class. But a good practice would be where the class ends. An ordinary function that is not the member function of a class has no privilege to access the private data members, but the friend function does have the capability to access any private data members. The declaration...
Read More »

C++ Loops, Creating a Pyramid

C++ program to create a pyramid using for loop and if condition. Example: #include<iostream> using namespace std; int main() { int i,j,k,space=10; // to print the pyramid in center, you can also increase the # of spaces for (int i=0;i<=5;i++) { for (int k=0;k<space;k++) { cout<<" "; } for (int j=0;j<2*i-1;j++) { cout<<"*"; } space--; cout<<endl; } cin.get(); /*use this to wait for a keypress*/ }    Program Output: * *** ***** ******* *******...
Read More »

C++ Program to find Perfect Number

Perfect number is a positive number which sum of all positive divisors excluding that number. For example: 6 is Perfect Number since divisor of 6 are 1, 2 and 3. Sum of its divisor is 1 + 2+ 3 =6 and 28 is also a Perfect Number since 1+ 2 + 4 + 7 + 14= 28 Other perfect numbers: 496, 8128 Example: #include<iostream> #include<cctype> using namespace std; int main(){ int n,i=1,sum=0; cout << "Enter a number: "; cin >> n; while(i<n){ ...
Read More »

C++ Compute the Sum and Average of Two Numbers

This program takes in two integers x and y as a screen input from the user. The sum and average of these two integers are calculated and outputted using the ‘cout’ command. Example: #include<iostream> using namespace std; int main(){ int x,y,sum; float average; cout << "Enter 2 integers : " << endl; cin>>x>>y; sum=x+y; average=sum/2; cout << "The sum of " << x << " and " << y << " is " <<...
Read More »

C++ Program to find Prime Number

A prime number (or a prime) is a natural number greater than 1 that has no positive divisors other than 1 and itself. Example: #include<iostream> #include<math.h> //sqrt function used using namespace std; int main(){ // Variable Declaration int n; // Get Input Value cout<<"Enter the Number : "; cin>>n; cout <<"List Of Prime Numbers Below "<<n<<endl; //for Loop Block For Find Prime Number for (int i=2; i<n; i++) for (int j=2; j*j<=i;...
Read More »

C++ Program to demonstrate the use of Ternary Operator

The conditional operator can often be used instead of the if else statement. Since it is the only operator that requires three operands in c++, It is also called the ternary operator. X = Y > 5 ? 4 : 8; If Y is greater than 5 then 4 will be assigned to variable X or else the value 8 will be assigned to X. Example: #include<iostream> #include<iomanip> using namespace std; int main (){ int first, second; cout << "Please enter two integers." << endl; ...
Read More »