C++.



- 6


/p>

}

(b) class CL1 {

public:

CL1() { c.real(0.0); c.imag(0.0); s = "not set"; }

// ...

private:

complex<double> c;

string s;

}

(c) class CL2 {

public:

CL2( map<string,location> *pmap, string key )

: _text( key ), _loc( (*pmap)[key] ) {}

// ...

private:

location _loc;

string _text;

};