History of C++
·
Many new programming
languages appeared during the 1960s. The computers at that time were still in
early stage of development.
·
The language ALGOL 60 was
developed as an alternate to FORTRAN.
·
The language CPL
(Combined Programming language) was developed in 1963.But it was very
difficult to learn.
·
Martin Richards
developed BCPL (Basic Combined Programming Language) in 1967 that was
simplification of CPL.
·
Ken Thompson created
the B language in 1970. C language was derived from B language.
The B language provided the basis for the development of C. C
language originally designed to write system program under UNIX operating
system.
·
The earlier version of C
was K&R (Kernighan and Ritchie) C. The American National Standard
Institute (ANSI) developed a standard version of C language. The
standard version is known as ANSI C.
·
Bjarne Stroustrup
form the Bell labs started the development of C++ language in
1980. It was originally named “C with Classes”. It was an enhancement to C language. It allows the use of programming
technique known as Object Oriented Programming (OOP).
·
C++ language was
refined during 1980s and it became a unique language.
Basic Structure of C++ Program
The
Format of Writing C++ Program in C++ is called its structure. It consist of the
following parts:
·
Preprocessor directive
·
Main() function
·
Program body (C++
statements)
Preprocessor Directive
Preprocessor directive is an instruction
given to the compiler before the execution actual program.
It is part of C++ compiler. It modifies C++
source program before compilation.
The semi-colon (;) is not used at
the end of preprocessor dirctives.
Preprocessor directives starts with hash
symbol #. These directive are written at eh start of the program.
Include Preprocessor
Include preprocessor directive is used to
include header files in the program.
Syntax
#include
<iostream.h>
The above statement tells the commpliler to
include the file iostream.h in source
program before compiling it.
Header Files
Header
files are collection of standard library functions to perform different tasks.
There are many header files for different purposes. Each header files contains
different types of predefined functions.
The
extension of a header files is .h. The include preprocessor directive is used
to include header files in programs. These files are provided by C++ compiler
system.
Syntax
#include<header_file_name>
The name of header file coan also ve used
in double quotes as follows:
#include”header_files_name”
Example:
#include”iostream.h”
The
word “iostream” stands for input/output stream. This header file contains the
definitions of built-in-input and output functions and objects.
C++ Statements
The
statements of the program are written in curly braces. The curly brace {
is called opening brace and } is called closing brace. The brace are
also known as delimiters. These statements are collectively known as the body
of a program. Each statement in C++ language is terminated by semicolon.
A
statement in C++ language is an instruction for the compiler to perform a task.
Compiler performs these instructions one by one in the same sequence in which
these instructions are written.
C++ Video Tutorials in Urdu
Lecture 1 Introduction to C++ Part 1 in Urdu/Hindi
Lecture 1 Introduction to C++ Part 2 in Urdu/Hindi
Lecture 1 Introduction to C++ Part 3 in Urdu/Hindi
Lecture 1 Introduction to C++ Part 4 in Urdu/Hindi
Lecture 1 Introduction to C++ Part 5 in Urdu/Hindi
C++ Books Links
Learn C++ in Urdu Pdf Book Free download
Object Oriented Programming in C++ Pdf Book Free download
C++ How to Program Pdf Book free download
ConversionConversion EmoticonEmoticon