I get an error message on the second line and I dont understand why. Shouldnt this code compile?
the message is:Code:wstring s(FileName, FileNameLength); s = wstring(L"\\") + s;
1>d:\dev\projects\dirwatcher\dirwatcher\dirwatcher .cpp(27) : error C2784: 'std::_String_iterator<_Elem,_Traits,_Alloc> std:perator +(_String_iterator<_Elem,_Traits,_Alloc>::differen ce_type,std::_String_iterator<_Elem,_Traits,_Alloc >)' : could not deduce template argument for 'std::_String_iterator<_Elem,_Traits,_Alloc>' from 'std::wstring'



LinkBack URL
About LinkBacks
perator +(_String_iterator<_Elem,_Traits,_Alloc>::differen ce_type,std::_String_iterator<_Elem,_Traits,_Alloc >)' : could not deduce template argument for 'std::_String_iterator<_Elem,_Traits,_Alloc>' from 'std::wstring' 



CornedBee
w)string - it may work as it is, but it's a bad idea to rely on it, as a different set of include files may drag in less "extras" and thus break your build.