Author Archive

Strings in Visual Studio 2008

If you get this error:

error C2784: ‘std:: _String_iterator <_Elem,_Traits,_Alloc> std::operator + (_String_iterator <_Elem,_Traits,_Alloc>::difference_type , std:: _String_iterator <_Elem,_Traits,_Alloc>) “:template argument for ‘std:: _String_iterator <_Elem,_Traits,_Alloc>”could not be derived from’ const char [5].

Then you have to add #include <string> to the header. Linux doesn’t require it, but Windows needs it (especially Visual Studio).

Advertisements
Advertisements