At 11/18/2009 10:01 PM, you 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); > ------------------------------------ > >but this doesn't work. I wanted to store the "2000" as an unsigned long in >destLong. >but srcStr is completely copied to destString and destLong is as it is (0). > >I guess I'm doing it wrong with type specifiers. _T"%s=%lu" > >Please explain how to correct it. > >-- >Cheers, >Vishva
I don't know about the "_T" type specifier. I'd leave it off. But try using "%4s=%lu" ~Rick
