Hello, all!
As the subj says :
in this case compiler generates an error:
[tt]
c:\Program Files\microsoft visual studio\vc98\mfc\include\afxtempl.h(129) : error C2440: 'type cast' : 'class CString' cannot be converted into 'unsigned long' ....
[/tt]
I've also tried
Here I got 5 warnings :
[tt]
c:\Program Files\microsoft visual studio\vc98\mfc\include\afxtempl.h(123) : warning C4786: 'std::_Tree<int,std:air<int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::map<int,std::basic_string<char,std::char_traits<c
har>,std::allocator<char> >,std::less<int>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Kfn,std::less<int>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >' : label is shortened in debug information up to 255 characters
[/tt]
Can anybody expalin me that??
The best thing is MSDN says :
"The simple map class, CMap, takes four parameters: [tt]KEY[/tt], [tt]ARG_KEY[/tt], [tt]VALUE[/tt], and [tt]ARG_VALUE[/tt]. Like the array and list classes, the map classes can store any data type.
As the subj says :
Code:
CMap< CString, CString&, CString, CString& > storage;
in this case compiler generates an error:
[tt]
c:\Program Files\microsoft visual studio\vc98\mfc\include\afxtempl.h(129) : error C2440: 'type cast' : 'class CString' cannot be converted into 'unsigned long' ....
[/tt]
I've also tried
Code:
CMap<CString,LPCSTR,CString,CString&>
[tt]
c:\Program Files\microsoft visual studio\vc98\mfc\include\afxtempl.h(123) : warning C4786: 'std::_Tree<int,std:air<int const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::map<int,std::basic_string<char,std::char_traits<c
har>,std::allocator<char> >,std::less<int>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Kfn,std::less<int>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >' : label is shortened in debug information up to 255 characters
[/tt]
Can anybody expalin me that??
The best thing is MSDN says :
"The simple map class, CMap, takes four parameters: [tt]KEY[/tt], [tt]ARG_KEY[/tt], [tt]VALUE[/tt], and [tt]ARG_VALUE[/tt]. Like the array and list classes, the map classes can store any data type.