() ($$6.5). , , , .. . , . . . , , . ++ ($$5.4.1). , , , , , . , , , . . . , " T", T . , , . - , , , . , , , , . , . " ++?" " ?". : " , , , " " ". ++ , , . " ", ++. , , . , . . , , . , ! , . [1] , , . , . [a] "" , . [b] "" , . [c] , , . [d] , . [2] , , : [] . [b] ( ). [c] -. [d] friend ( , [], [b] [c]). [e] - . [f] " "; . [g] - . , ++ . ++. " " ($$R.18). , ++ , . ++: const ($$2.5) enum ($$2.5.1), ; inline ($$4.6.2), , ; ($$8), . , , , ++ , . malloc(), new ($$3.2.6). , , . , - , ; ($$2.6.2). void*, , . - , - . , ++, extern "C" ($$4.4). , , , - . . , , , . [1] A.V.Aho, J.E.Hopcroft, and J.D.Ulman: Data Structures and Algoritms. Addison-Wesley, Reading, Massachusetts. 1983. [2] O-J.Dahl, B.Myrhaug, and K.Nugaard: SIMULA Common Base Language. Norwegian Computing Ctnter S-22. Oslo, Norway. 1970 [3] O-J.Dahl and C.A.R.Hoare: Hierarhical Program Construction in Structured Programming. Academic Press, New York. 1972. pp. 174-220. [4] Margaret A.Ellis and Bjarne Stroustrup: The Annotated C++ Reference Manual. Addison-Wesley, Reading, Massachusetts. 1990. [5] A.Goldberg and D.Rodson: SMALLTALK-80 - The Language and Its Implementation. Addison-Wesley, Reading, Massachusetts. 1983. [6] R.E.Griswold et.al.: The Snobol14 Programming Language. Prentice-Hall, Englewood Cliffs, New Jersy, 1970. [7] R.E.Griswold and M.T.Griswold: The ICON Programming Language. Prentice-Hall, Englewood Cliffs, New Jersy. 1983. [8] Brian W.Kernighan and Dennis M.Ritchie: The C Programming Language. Prentice-Hall, Englewood Cliffs, New Jersy. 1978. Second edition 1988. [9] Andrew Koenig and Bjarne Stroustrup: C++: As Close to C as possible - but no closer. The C++ Report. Vol.1 No.7. July 1989. [10] Andrew Koenig and Bjarne Stroustrup: Exception Handling for C++ (revised). Proc USENIX C++ Conference, April 1990. Also, Journal of Object Oriented Programming, Vol.3 No.2, July/August 1990. pp.16-33. [11] Barbara Liskov et.al.: CLU Reference Manual. MIT/LCS/TR-225. [12] George Orwell: 1984. Secker and Warburg, London. 1949. [13] Martin Richards and Colin Whitby-Strevens: BCPL - The Language and Its Compiler. Cambridge University Press. 1980. [14] L.Rosler: The Evolution of C - Past and Future. AT&T Bell Laboratories Technical Journal. Vol.63 No.8 Part 2. October 1984. pp.1685-1700. [15] Ravi Sethi: Uniform Syntax for Type Expressions and Declarations. Software Practice & Experience, Vol.11. 1981. pp.623-628. [16] Bjarne Stroustrup: Adding Classes to C: An Exercise in Language Evolution. Software Practice & Experience, Vol.13. 1983. pp.139-61. [17] Bjarne Stroustrup: The C++ Programming Language. Addison-Wesley. 1986. [18] Bjarne Stroustrup: Multiple Inheritance for C++. Proc. EUUG Spring Conference, May 1987. Also USENIX Computer Systems, Vol.2 No 4, Fall 1989. [19] Bjarne Stroustrup and Jonathan Shopiro: A Set of C classes for Co-Routine Style Programming. Proc. USENIX C++ conference, Santa Fe. November 1987. pp.417-439. [20] Bjarne Stroustrup: Type-safe Linkage for C++. USENIX Computer Systems, Vol.1 No.4 Fall 1988. [21] Bjurne Stroustrup: Parameterized Type for C++. Proc. USENIX C++ Conference, Denver, October 1988. pp.1-18. Also, USENIX Computer Systems, Vol.2 No.1 Winter 1989. [22] Bjarne Stroustrup: Standardizing C++. The C++ Report. Vol.1 No.1. January 1989. [23] Bjarne Stroustrup: The Evolution of C++: 1985-1989. USENIX Computer Systems, Vol.2 No.3. Summer 1989. [24] P.M.Woodward and S.G.Bond: Algol 68-R Users Guide. Her Majesty's Stationery Office, London. 1974. [25] UNIX Time-Sharing System: Programmer's Manual. Research Version, Tenth Edition. AT&T Bell Laboratories, Murray Hill, New Jersy, February 1985. [26] Aake Wilkstroem: Functional Programming Using ML. Prentice-Hall, Englewood Cliffs, New Jersy. 1987. [27] X3 Secretariat: Standard - The C Language. X3J11/90-013. Computer and Business Equipment Manufactures Association, 311 First Street, NW, Suite 500, Washington, DC 20001, USA. 11.  * ++ " , , ". (" VI", II) ++. . . - , . 1.1  ++ , : - ; - ; - - . . $$1.2 "", "" "-" . , . " " ". ++ - " ". , , - . C ++. - " " " - ". , - . $$1.3 . , , , , - . 2, 3 4. $$1.4 , . , , , , , , . 5, 7, 8 9. $$1.5 - . , , . 6. $$1.6 , ++ . , , . - , , , , . , . , . 1.2  - - , "" . - , : , - . . , , , ( , ). , , . , . , - , , . () , . , , . - . , . , , . , , , . . , , , . : [1] . [2] , . [3] . [4] , . [5] , . . . : ", , ". , , ++ - . , , - . , . . 1.2.1  (, , ) : , ; ! , . . , , , , , (, , , ...) .. , 60, 68, . . , : double sqrt ( double arg ) { // } voide some_function () { double root = sqrt ( 2 ); // .. } // , . . 1.2.2  . . , . : , ; , " ". , . "" . - . : [1] (, push () pop ()). [2] , (, ) . [3] . -2 , . , : // , // : void push ( char ); char pop (); const int stack_size = 100; , stack.h, : #include "stack.h" // static char v [ stack_size ]; // ``static'' // / static char * p = v; // void push ( char c ) { // } char pop () { //, , } , , , . : v p - , .. (), . : #include "stack.h" // void some_function () { push ( 'c' ); char c = pop (); if ( c != 'c' ) error ( "" ); } , , , .. , , , . ++ , ($$5.4.3 $$5.4.4). ++, , , , .. . 1.2.3  , . , : class stack_id { /* ... */ }; // stack_id // // stack_id create_stack ( int size ); // // void push ( stack_id, char ); char pop ( stack_id ); destroy_stack ( stack_id ); // , , , , "", . "" . , . "" , , "" . , , . ( ), . , (- ) , ( stack_id ). , , , , : void f () { stack_id s1; stack_id s2; s1 = create_stack ( 200 ); // : s2 push ( s1,'a' ); char c1 = pop ( s1 ); destroy_stack ( s2 ); // // : s1 s1 = s2; // // , // s2 } , , , , . , Clu, ++ , , , . , , , . . , , , . " " , $$4.6. : , ; . , , , , . , , : class complex { double re, im; public: complex(double r, double i) { re=r; im=i; } complex(double r) // float->complex { re=r; im=0; } friend complex operator+(complex, complex); friend complex operator-(complex, complex); // friend complex operator-(complex) // friend complex operator*(complex, complex); friend complex operator/(complex, complex); // ... }; (.. ) complex . (private): re im , complex. : complex operator + ( complex a1, complex a2 ) { return complex ( a1.re + a2.re, a1.im + a2.im ); } : void f () { complex a = 2.3; complex b = 1 / a; complex c = a + b * complex ( 1, 2.3 ); // ... c = - ( a / b ) + 2; } ( ) . 1.2.4  " ". . , . . , , shape (). , : (circle), (triangle) (square). : class point { /* ... */ }; class color { /* ... */ }; shape : enum kind { circle, triangle, square }; class shape { point center; color col; kind k; // public: point where () { return center; } void move ( point to ) { center = to; draw (); } void draw (); void rotate ( int ); // }; " " k , , draw () rotate (), , ( , k -). draw () : void shape :: draw () { switch ( k ) { case circle: // break; case triangle: // break; case square: // break; } } , . , . , . , , , . , , . . , , , . , , , (.. shape). 1.2.5 -  , (, , ..) (, - , , , ..). - , . , , - . . , . , : class shape { point center; color col; // ... public: point where () { return center; } void move ( point to ) { center = to; draw(); } virtual void draw (); virtual void rotate ( int ); // ... }; , , (.. ) , virtual (). ++ : " , ". , : void rotate_all ( shape v [], int size, int angle ) // "v" "size" // "angle" { int i = 0; while ( i<size ) { v [ i ] . rotate ( angle ); i = i + 1; } } , , - ( ): class circle : public shape { int radius; public: void draw () { /* ... */ }; void rotate ( int ) {} // , }; ++ circle shape, shape circle. , "" "" circle shape . : , ; ; . , . - , . , , , , - . , , , . , - , , . . . . : , "" , . , - , , [2] [6], 11. , , , , - . , , - . 1.3 " " , , . - . ++ ( ), - . . 1.3.1  ++ : main () { } , main, . { } ++ . () main. ++ main(), . - . , Hello, World! ( !): #include <iostream.h> int main () { cout << "Hello, World!\n"; } #include <iostream.h> , , - , iostream.h. cout << "Hello, World!\n" . << ("") . "Hello, World!\n" cout. - , . : \ - . \n ( ), Hello, world! , main(), , . , - "" . / 10. 1.3.2  . , . , int inch; , inch int, .. inch . - , . . , , . , " " , : char short int long . : float double long double . char , ( ). int , ( ). : + (, ) - (, ) * () / () % ( ) : == () != ( ) < ( ) <= ( ) >= ( ) ++ , : double d; int i; short s; // ... d = d + i; i = s * i; = . 1.3.3  : char v [ 10 ]; // 10 : char * p; // [] " ", * " ". , v 10 : v [ 0 ] ... v [ 9 ]. : p = & v [ 3 ]; // p 4- v & . 1.3.4  ++ . if, switch while. . , i, - c: #include <iostream.h> int main () { const float fac = 2.54; float x, in, cm; char ch = 0; cout << "enter length: "; cin >> x; // cin >> ch // if ( ch == 'i' ) { // in = x; cm = x * fac; } else if ( ch == 'c' ) { // in = x / fac; cm = x; } else in = cm = 0; cout << in << " in = " << cm << " cm\n"; } >> (" ") ; cin . , >>, , ; . switch () . : switch ( ch ) { case 'i': in = x; cm = x * fac; break; case 'c': in = x / fac; cm = x; break; default: in = cm = 0; break; } break . . , default. default . , 10 : int v1 [ 10 ]; int v2 [ 10 ]; // ... for ( int i=0; i<10; i++ ) v1 [ i ] = v2 [ i ]; : " i , i 10, i- i." (++) 1. 1.3.5  - , , . , : extern float pow ( float, int ); // pow () int main () { for ( int i=0; i<10; i++ ) cout << pow ( 2, i ) << '\n'; } . pow float int, float. , . ,