Please use code tags when posting code.You will also need a destructor and an implementation of the assignment operator.Code:test(const test& obj) { i = new int(*obj.i); }
| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | VB Forums | Developer.com |
|
Results 1 to 2 of 2
Thread: Copy cons for integer pointerThreaded View
|
Click Here to Expand Forum to Full Width |