On Thu, Nov 19, 2009 at 3:01 AM, Vishva <[email protected]> wrote: > This might be very simple to most of you. > > ------------------------------------ > TCHAR destString[10]; > unsigned long destLong = 0; > > // srcStr contains a string like "xxxx=2000" > ret = swscanf(srcStr, _T"%s=%lu", destString, destLong);
Previous comments about the string specifier aside... Plain scanf() would require a pointer to a long - is destLong a long, or a pointer to a long? If the former, you probably need something akin to: ret = swscanf(srcStr, _T"%s=%lu", destString, &destLong); with the & before destLong. -- PJH http://shabbleland.myminicity.com/ http://www.chavgangs.com/register.php?referer=9375 http://www.kongregate.com/?referrer=Shabble
