Click here to Skip to main content
15,895,794 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi! I'm new in c++ and i don't know how to read a number that start with 0.
For example if i have 0765 and i want to read this number i will have 765 , but i want 0765. Thanks in advance!
Posted
Comments
Sergey Alexandrovich Kryukov 13-Oct-14 11:50am    
765 is the same 0765. The question makes no sense.
"765" and "0765" are different strings, but you are not reading strings, you are reading numbers.
—SA

1 solution

That does not really make sense, if you read those four characters then that is what you will have. However, if you are talking about converting it to the octal number 0765, then you should look at http://msdn.microsoft.com/en-us/library/w4z2wdyc.aspx[^].
 
Share this answer
 

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