Click here to Skip to main content
15,887,355 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
sprintf(dataStr, "%.2lX", (int) m_configObj->m_EncoderList[j].m_video.Contrast);


I want to know about %.2lx in this program.
Posted
Updated 15-Sep-11 3:54am
v2

1 solution

See this Link : http://www.cplusplus.com/reference/clibrary/cstdio/sprintf/

Format for sprintf
%[flags][width][.precision][length]specifier


now
%.2lx - % -> as format before flags
-> .2 - precision : specifies the minimum number of digits to be written.
-> l - Length : long int or unsigned long int
-> x - specifier : Unsigned hexadecimal integer
 
Share this answer
 
v2
Comments
Sergey Chepurin 15-Sep-11 4:36am    
lx, lX -A long unsigned hexadecimal integer in lowercase or uppercase.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900