Hi All
class test
{
int *i;
public:
test(int n)
{
i = new int(n)
}
test(const test& obj)
{
}
void disp()
{
cout<<*i<<endl;
}
};
Please tell me how to write copy constructor for this class
Thanks
| 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 |