If for instance the variable=771 I get 000003 instead of 000303. For any number I have 0000. If the variable is int it is not a problem but If
the format is int32 I think %06x is not correct.
Does anyone know the solution?
Thanks
Ttelmah Guest
Posted: Mon May 26, 2008 3:28 am
You need to add an 'L'.
%x formats are to convert integers. To convert a 'long' (int16, or int32), the format is %Lx. What you are seeing is only the low 8bits of your value, since you don't have the 'L'. %06Lx, should give what you want.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum