Can anyone tell me what is the problem in the following code. It gives me an error saying No Copy Constructor Available for MyStruct
In StdAfx.h:
struct MyStruct {
int x;
long y;
char z;
}
CList<MyStruct, MyStruct> MyList;
In the Main program:
MyStruct a;
a.x = 2;
a.y = 100000;
a.z= 'c';
MyList.AddTail( a );
How can one write a copy constructor for a structure.
In StdAfx.h:
struct MyStruct {
int x;
long y;
char z;
}
CList<MyStruct, MyStruct> MyList;
In the Main program:
MyStruct a;
a.x = 2;
a.y = 100000;
a.z= 'c';
MyList.AddTail( a );
How can one write a copy constructor for a structure.