Tokenizing strings using _tcstok_s

So what is Tokenizing, eh? Well it’s the process of splitting a string into smaller strings (called tokens) based on a given delimiter string. For e.g. If we have to split a string called “Nibu Babu Thomas” 😉 and the delimiter string is ” ” (space). So our tokens will be Nibu Babu Thomas So […]
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…