Hi, I'm using VS 2008 to create a C++ DLL (not managed) project and I need convert a char* to a long long type. Is there an easy way to do it?
Thanks in advance :)
Hi, I'm using VS 2008 to create a C++ DLL (not managed) project and I need convert a char* to a long long type. Is there an easy way to do it?
Thanks in advance :)
If you're using boost, lexical_cast is the way to go, in my opinion.
long long ll = boost::lexical_cast<long long>(mystr)
Asked and answered soooo many times: See: http://stackoverflow.com/questions/200090/how-do-you-convert-a-c-string-to-an-int