Upload
romeo1480
View
674
Download
5
Embed Size (px)
Citation preview
++ C
1.0
:
++C. . .++C .++C .++C
1
1.1
++C . ++C . ++C . ++C .C Bjarne Stroustrup 9791 C ) (C with classes ++C 3891. ++C Object Oriented Programming ) (OOP . . : PascalC Basic Fortran ) .(Procedural : .. . . . ) (Functions ) (Procedures . : . . .
2
Pascal C ) ( Local . . . . . )( . . :- ) (Object - )-(Member functions ) (Encapsulated . : ) ( ) (. ++C . ):(Inheritance OOP . . OOP ) (Base class ).(Derived classes
3
:Reusability Reusability . :- . Polymorphism and overloading : . ++C + = .
++ C
1.2
:- :1-1 //Program .//This program will display a message on the screen >#include#include > 7. 3- >>.a Basic ++C . cout :-//Program 1-3:This program displays output on the screen >#include#include= 0 && h < 24) ? h : 0; minute = (m >= 0 && m < 60) ? m : 0; second = (s >= 0 && s < 60) ? s : 0; } void Time::printMilitary( ) { cout