From: ajay on
On Mar 11, 2:39 pm, ajay <ajaykamath1...(a)gmail.com> wrote:
> hi all
> the following code snippet is causing the problem
>
> typdef unsigned __int64 uint64_t
>
> uint64_t val1,val2;
> val1 =1111;
> val2 =2222;
>
> snprintf(&buffer,length,"val1=%llu,val2=%llu",val1,val2);
>
> ==> value of buffer is --> val1=1111,val2=0
> why is val2 not getting copied correctly?
>
> However using the following snippet work fine
>
> len = snprintf(&buffer,length,"val1=%llu",val1);
> snprintf(&buffer[len],length,",val2=%llu"val2);
>
> ==> value of buffer is --> val1=1111,val2=2222
>
> why does snprintf fail in first case?
>
> Device details
> windows mobile 6.1
> LG-CT810

hi
i got the answer to this just thought might help someone else too need
to use %I64u instead of %llu