c++菜鸟求教 typedef struct
这是一段简单的struct定义
typedef struct PortDetail
{
public:
_bstr_t portDescription;
DWORD portNumber;
bool portIsDefault;
PortDetail()
{
portNumber = 0;
portIsDefault = true;
}
// Used to create a working copy during edit operation
PortDetail & operator = (PortDetail & portDetail)
{
portDescription = portDetail.portDescription;
portNumber = portDetail.portNumber;
portIsDefault = portDetail.portIsDefault;
return *this;
}
} PORT_DETAIL;
-------------------------------
其中不懂:
// Used to create a working copy during edit operation
PortDetail & operator = (PortDetail & portDetail)
{
portDescription = portDetail.portDescription;
portNumber = portDetail.portNumber;
portIsDefault = portDetail.portIsDefault;
return *this;
}
是何意思,哪位大虾给解释解释,谢了!