check number is octal or not??

Write a C++ program to read an integer and test that the given integer is an octal number or not?????

i m in problem when u put 0 in first position of integer example: 0123, it creates a problems...

please tell me right program , how i find it out
If you put a zero in the front, you've made it octal.
Topic archived. No new replies allowed.