private, public, protected.
Private: , .
Public: ,
Protected: To , private. , . , private protected .
.
, , , .
++ , , , . virtual. . , .
, , , . .
, , . , , .
. , .
.
Image Additional. Picture Editor. Load
.
cout. :
#include <iostream.h>
void main(void)
{
cout " ";
}
, , . cout , .
.
Form2
Form2 f2=gcnew Form2();
f2->Show();
- -.
- , - . friend. :
|
|
Multiply - Matrix.
-. A B, ( ) - B. :
class Matrix {... int t; void SomeFunction(); friend class Vector;...};...class Vector{ int GetNum(){ return 1;}};
:
void Matrix::SomeFunction(){ t=Vector::GetNum();} friend . , , . 7. . , , . , , . : , , , . #include, ( ) . #include "-" , , -