Weird problem with sscanf
Hi, I've got a weird problem here:
I have a routine of reading from a file and getting some values for the variables from it. Here's the problem:
and the buffer's value (from debug) is:
sscanf ( buffer,"%d : %d : %d : %d : %d",&mWidth, &mHeight, &mTransCol.transR, &mTransCol.transG , &mTransCol.transB);
the value of variables are:
buffer = "22 : 21 : 1 : 2 : 3\r\n\000..."
I'm confused. Why does the mWidth is 0 whereas in the buffer string it's clearly 22 ?? Can anybody help me with this?