struct结构有自己的拷贝构造功能吗?
error C2664: 'Add' : cannot convert parameter 1 from 'struct tagTrainStopTime' to 'struct tagTrainStopTime'
No copy constructor available for struct 'tagTrainStopTime'
typedef struct tagTrainStopTime
{
int x1;
int x2;
} P;
CArray<P,P> a;
P p1;
p1.x1=1;
p1.x2=2;
a.Add(p1);
请问有没有简单的办法可以解决这个问题(不是重新编写成类,并为它定义拷贝构造函数)?