阅读背景:

C++结构体作为map的key的时候需要重载

来源:互联网 

typedef struct DICOMRowsAndVolumn{
	CString strRows;
	CString strColumn;
	bool operator <(const DICOMRowsAndVolumn &other) const
	{
		if(this->strRows==other.strRows && this->strColumn==other.strColumn) return false;
		else return true;
	}
}RowsAndVolumn;

//定义map
map<RowsAndVolumn,int> m_RowsAndVolumn;typedef struct DICOMRowsAndVolumn



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: