prog.cpp:8:2: error: ‘CString’ does not name a type
CString MAC;
^
prog.cpp:9:2: error: ‘CString’ does not name a type
CString SiteName;
^
prog.cpp:11:19: error: ‘CString’ has not been declared
SiteInfo(int ID, CString BelongMAC, CString name)
^
prog.cpp:11:38: error: ‘CString’ has not been declared
SiteInfo(int ID, CString BelongMAC, CString name)
^
prog.cpp: In constructor ‘SiteInfo::SiteInfo(int, int, int)’:
prog.cpp:14:3: error: ‘MAC’ was not declared in this scope
MAC = BelongMAC;
^
prog.cpp:15:3: error: ‘SiteName’ was not declared in this scope
SiteName = name;
^
prog.cpp: In member function ‘bool SiteInfo::operator==(SiteInfo) const’:
prog.cpp:20:34: error: ‘MAC’ was not declared in this scope
if ((SiteID == rhs.SiteID) && (MAC == rhs.MAC))
^
prog.cpp:20:45: error: ‘const struct SiteInfo’ has no member named ‘MAC’
if ((SiteID == rhs.SiteID) && (MAC == rhs.MAC))
^
prog.cpp: In member function ‘bool SiteInfo::operator<(SiteInfo) const’:
prog.cpp:30:7: error: ‘MAC’ was not declared in this scope
if (MAC < rhs.MAC)
^
prog.cpp:30:17: error: ‘const struct SiteInfo’ has no member named ‘MAC’
if (MAC < rhs.MAC)
^
prog.cpp:32:7: error: ‘SiteName’ was not declared in this scope
if (SiteName < rhs.SiteName)
^
prog.cpp:32:22: error: ‘const struct SiteInfo’ has no member named ‘SiteName’
if (SiteName < rhs.SiteName)
^
prog.cpp: In function ‘int main()’:
prog.cpp:41:2: error: ‘CString’ was not declared in this scope
CString mac = _T("00:00:00:00:00:01");
^
prog.cpp:41:10: error: expected ‘;’ before ‘mac’
CString mac = _T("00:00:00:00:00:01");
^
prog.cpp:42:20: error: ‘mac’ was not declared in this scope
SiteInfo site1(1, mac, _T("瞇摸鐵克site1"));
^
prog.cpp:42:47: error: ‘_T’ was not declared in this scope
SiteInfo site1(1, mac, _T("瞇摸鐵克site1"));
^
prog.cpp:45:21: error: the value of ‘CString’ is not usable in a constant expression
std::map<SiteInfo, CString> RegisterMap;
^
prog.cpp:41:2: note: ‘CString’ was not declared ‘constexpr’
CString mac = _T("00:00:00:00:00:01");
^
prog.cpp:45:28: error: type/value mismatch at argument 2 in template parameter list for ‘template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map’
std::map<SiteInfo, CString> RegisterMap;
^
prog.cpp:45:28: error: expected a type, got ‘CString’
prog.cpp:45:28: error: template argument 4 is invalid
prog.cpp:45:41: error: invalid type in declaration before ‘;’ token
std::map<SiteInfo, CString> RegisterMap;
^
prog.cpp:46:14: error: request for member ‘insert’ in ‘RegisterMap’, which is of non-class type ‘int’
RegisterMap.insert(std::make_pair(site1, _T("site1 in map")));
^
prog.cpp:47:14: error: request for member ‘insert’ in ‘RegisterMap’, which is of non-class type ‘int’
RegisterMap.insert(std::make_pair(site2, _T("site2 in map")));
^
prog.cpp:49:21: error: the value of ‘CString’ is not usable in a constant expression
std::map<SiteInfo, CString>::iterator iter1 = RegisterMap.find(site1);
^
prog.cpp:41:2: note: ‘CString’ was not declared ‘constexpr’
CString mac = _T("00:00:00:00:00:01");
^
prog.cpp:49:28: error: type/value mismatch at argument 2 in template parameter list for ‘template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map’
std::map<SiteInfo, CString>::iterator iter1 = RegisterMap.find(site1);
^
prog.cpp:49:28: error: expected a type, got ‘CString’
prog.cpp:49:28: error: template argument 4 is invalid
prog.cpp:49:40: error: expected initializer before ‘iter1’
std::map<SiteInfo, CString>::iterator iter1 = RegisterMap.find(site1);
^
prog.cpp:50:21: error: the value of ‘CString’ is not usable in a constant expression
std::map<SiteInfo, CString>::iterator iter2 = RegisterMap.find(site2);
^
prog.cpp:41:2: note: ‘CString’ was not declared ‘constexpr’
CString mac = _T("00:00:00:00:00:01");
^
prog.cpp:50:28: error: type/value mismatch at argument 2 in template parameter list for ‘template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map’
std::map<SiteInfo, CString>::iterator iter2 = RegisterMap.find(site2);
^
prog.cpp:50:28: error: expected a type, got ‘CString’
prog.cpp:50:28: error: template argument 4 is invalid
prog.cpp:50:40: error: expected initializer before ‘iter2’
std::map<SiteInfo, CString>::iterator iter2 = RegisterMap.find(site2);
^