4.23.2005

Q&A: what if the following member function...

...is defined for the Instrument class?

class Instrument {
public:
  ...
  void doNothing(Instrument instr) {}
   ...
}

Default copy constructor doesn't work for dynamically allocated memory.

Instrument c("another bond");
a.doNothing(c);

Category: C++ Quant > C++

No comments:

Post a Comment