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 m_RowsAndVolumn;


你可能感兴趣的:(C++)