|
-
December 22nd, 2005, 06:02 AM
#1
_tcstol Conversion Problem...
Hi,
I have to convert a hex value to int, for that I use
Variable are of foll. type..
std::string pFirstStr
wchar_t ptrTemp;
nChar = _tcstol(pFirstByteStr.c_str(), &ptrTemp,16);//Problem is here
as I have to support unicode.
Can u suggest solution, by which I can convert a hex value in std::string variable to int using UNICODE supported function...
Regs
-
December 22nd, 2005, 06:28 AM
#2
Re: _tcstol Conversion Problem...
Like this?
Code:
std::wstring pFirstStr
wchar_t* ptrTemp;
nChar = _tcstol(pFirstByteStr.c_str(), &ptrTemp,16);//Problem is here
or maybe something like this:
Code:
std:basic_string<TCHAR> pFirstStr;
TCHAR* ptrTemp;
nChar = _tcstol(pFirstByteStr.c_str(), &ptrTemp,16);
- petter
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|