Replacement for CString::Format in standard C++

std::stringstream can be used as a replacement for CString::Format, if you are using CString just for the sake of Format, caveat being that it could be slow, I’ve heard a user mentioning this but not sure, I haven’t tested it out, but should be definitely better that using CString::Format and then assigning to std::string. [sourcecode […]
Continue reading…

 

A TCHAR version of std stream and string classes

Quite simple… [sourcecode language=’cpp’]// A TCHAR based std::string typedef std::basic_string tstring; // A TCHAR based std::ifstream; typedef std::basic_ifstream tstream; // A TCHAR based std::stringstream typedef std::basic_stringstream tstringstream;[/sourcecode] So now no need to worry about UNICODE and ANSI, should work as CString, since TCHAR becomes char/wchar_t based on _UNICODE macro definition. Also note that stl has […]
Continue reading…