例如:
- C/C++ code
using namespace System; ref class Person { public: string ^name; float fFaceLength; float fFaceWidth;Public: Person(void);}
请问这个Person类的拷贝构造函数怎么写,另外怎么重载它的赋值操作符"operator="
谢谢!
------解决方案--------------------------------------------------------
name 的string要赋值
float类型直接=
operator=类似拷贝构造
------解决方案--------------------------------------------------------
.H文件:
- C/C++ code
#pragma onceref class Person{public: double name; float fFaceLength; float fFaceWidth;public: Person(void); Person ( Person% other ); Person% operator =( Person% other );};