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…

 

Converting a string to number and vice versa

There are standard C functions which helps us in this. Some are listed below, and they are quite easy to use! strtol, strtoul – Function to convert a string to integer, also converts numbers in different bases for e.g. hex, oct, decimal strtod – Function to convert a string to double atoi, wtoi, _ttoi – […]
Continue reading…