5-Lecture-PF-Intro To C++
5-Lecture-PF-Intro To C++
Introduction to C++
History of C++
In 1979 Bjarne Stroustrup started working on C language to make it object
oriented .
He was inspired from the languages called SIMULA(A computer language used
for simulation ) which was a Object Oriented Programing Language.
❑Encapsulation
❑Data hiding
❑Inheritance
❑Polymorphism
Introduction to C language(Continued…)
C++ is supports variety of platforms like windows, Mac, Unix
C++ has also been found useful in many other contexts, including desktop
applications, servers
#include<stdio.h> #include<iostream>
int main() Using namespace std;
int main()
{
{
printf(“hello this c program”); cout<<“Hello this is C++ Program”;
retrun 0; return 0;
The built in C++ library routines are kept in the
standard} namespace. That includes stuff like cout, cin, }
string, vector, map, etc. Because these tools are used
Save as
so commonly, it's .c extension
popular to add "using namespace Save as .cpp extension
std" at the top of your source code so that you won't
have to type the std:: prefix constantly.