, , .
.
/, .
.
.
:
class Test
{
public:
int num;
};
int main
{
Test testObj();
testObj.num = 100;
}
, private, . exmaple setNum()
.
class Test
{
public:
Test(int);
private:
int num;
};
Test::Test(int value)
{
this -> num = value;
}
int main
{
Test testObj(100);
}
- , , , , setNum() .
testObj.setNum(100);
, char [], int. . int, char [], .
, , char [] char *.
.