ciao.
Vorrei creare un indice per una mappa stl che ha due paramentri :
1)shader , un wstring
2)geometry un wstring
ho provato a fare:
ma non va , mi da ques errore:codice:class Cidx{ public: wstring strShader; wstring strGeometry; }; std::map<Cidx,wstring>m; Cidx idx; idx.strGeometry = L"giugio"; idx.strShader = L"ferrari"; m[idx]= L"test1"; Cidx idx1; idx1.strGeometry = L"1"; idx1.strShader = L"2"; m[idx1] = L"test2"; wstring str1 = m[idx]; wstring str2 = m[idx1]; idx.strGeometry =L"asdasd"; str1 = m[idx];
Error 1 error C2784: 'bool std:perator <(const std::_Tree<_Traits> &,const std::_Tree<_Traits> &)' : could not deduce template argument for 'const std::_Tree<_Traits> &' from 'const Cidx' C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfunctional 125
come posso risolvere?
grazie.