C++.


, - 3


(a) class BinStrTreeNode {

public:

// ...

private:

string _value;

int _count;

BinStrTreeNode *_leftchild;

BinStrTreeNode *_rightchild;

};

(b) class BinStrTree {

public:

// ...

private:

BinStrTreeNode *_root;

};

(c) class iMatrix {

public:

// ...

private:

int _rows;

int _cols;

int *_matrix;

};

(d) class theBigMix {

public:

// ...

private:

BinStrTree _bst;

iMatrix _im;

string _name;

vectorMfloat> *_pvec;

};

14.15

, 14.3 14.2? , . , .

14.16

, :

Point global;

 

Point foo_bar( Point arg )

{

Point local = arg;

Point *heap = new Point( global );

*heap = local;

Point pa[ 4 ] = { local, *heap };

return *heap;

}