Author: Victor BazarovVictor Bazarov Date: May 9, 2008 14:22
notahipee wrote:
> I have been trying to cin an number from 0 to 9 with a leading 0. For
> example 00 or 07. I was using a switch case.
You were using a switch case for what?
> switch (int)
^^^^^^^^^^^
That's a syntactically incorrect statement.
> {
> case 01: break;
> case 02: break;.....
> My problem arises at 08 and 09 because they are not octal.
What problem would that be?
> Is there
> any way to coerce the input variable to decimal despite it having a
> leading zero .
This is a glimmer of an actual problem you seem to be having... But
I am not seeing the alleged behaviour in the following program.
|