13-09-2012, 11:12 AM
Introduction to C++
Introduction to C++.ppt (Size: 339.5 KB / Downloads: 26)
C++
C++ is an object-oriented programming language.
Developed by Bjarne Stroustrup at AT&T Bell opeLaboratories, USA in the early 1980’s.
Idea of c++ comes from increment operator ‘++’
C++ is n incremented version of C
Versions of C++
Traditional version
Based upon Bjarne Stroustrup’s original designs
Standard C++
Created by Stroustrup and the ANSI/ISO standardization committee
Standard C++ is a superset of traditional C++
A Simple Program
C++ works by giving (separate) instructions to the computer.
These instructions can be written as functions.
The primary function used in C++ is called main. This means that every C++ program should have the main() function. Because a function is an assignment, in order to perform its job, a function has a body. The body of a function starts with an opening curly bracket "{" and closes with a closing curly bracket "}".
using namespace std;
Namespace is a new concept introduced by the ANSI C++ standards committee.
provide a means of grouping logically related identifiers into corresponding namespaces
std is the namespace where ANSI C++ standard class libraries are defined.
allows you to use cout and endl without the prefix std::. It means that if you do not
include this statement, then cout should be used as std::cout and endl should be used as std::endl.
Int main()
A C++ program is a collection of functions, one of which is the function main.
The main function is the point by where all C++ programs start their execution, independently of its location within the source code.
In C++, main () returns an integer value to the operating system.
the default return type for all function in C++ is int.
Introduction to C++.ppt (Size: 339.5 KB / Downloads: 26)
C++
C++ is an object-oriented programming language.
Developed by Bjarne Stroustrup at AT&T Bell opeLaboratories, USA in the early 1980’s.
Idea of c++ comes from increment operator ‘++’
C++ is n incremented version of C
Versions of C++
Traditional version
Based upon Bjarne Stroustrup’s original designs
Standard C++
Created by Stroustrup and the ANSI/ISO standardization committee
Standard C++ is a superset of traditional C++
A Simple Program
C++ works by giving (separate) instructions to the computer.
These instructions can be written as functions.
The primary function used in C++ is called main. This means that every C++ program should have the main() function. Because a function is an assignment, in order to perform its job, a function has a body. The body of a function starts with an opening curly bracket "{" and closes with a closing curly bracket "}".
using namespace std;
Namespace is a new concept introduced by the ANSI C++ standards committee.
provide a means of grouping logically related identifiers into corresponding namespaces
std is the namespace where ANSI C++ standard class libraries are defined.
allows you to use cout and endl without the prefix std::. It means that if you do not
include this statement, then cout should be used as std::cout and endl should be used as std::endl.
Int main()
A C++ program is a collection of functions, one of which is the function main.
The main function is the point by where all C++ programs start their execution, independently of its location within the source code.
In C++, main () returns an integer value to the operating system.
the default return type for all function in C++ is int.