Well, I think Paul is right, destLong should be a pointer to a long
so the swscanf code should be like..

ret = swscanf(srcStr, _T"%s=%lu", destString, &destLong);



2009/11/19 Paul Herring <[email protected]>

>
>
> On Thu, Nov 19, 2009 at 3:01 AM, Vishva 
> <[email protected]<vishvaya%40gmail.com>>
> 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
>  
>



-- 
Cheers,
Vishva


[Non-text portions of this message have been removed]



------------------------------------

To unsubscribe, send a blank message to 
<mailto:[email protected]>.Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/c-prog/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/c-prog/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply via email to