int month = 9, day = 7;
int month = 09, day = 07;
are they the same?
Does putting a zero in front mean it is octal instead of decimal number?
L'a' and L"a"
are those the same?
putting L in front of a character literal turns it into type wchar_t. does it apply to string literals too?
When I did this ;
int j = 9;
int i = 09;
I got this
1>c:\users\jordan\documents\visual studio 2010\projects\hold\hold\hold.cpp(10): error C2041: illegal digit '9' for base '8'
|Does putting a zero in front mean it is octal instead of decimal number? |
Yes, it does. Did you try to compile you code? Because it should give you an error on
int month = 09
error: invalid digit "9" in octal constant|
Last edited on
Topic archived. No new replies allowed.