-
Question about compiler
I'm getting a wierd error I compile this code.
Code:
include "stdafx.h"
using namespace System;
struct phone
{
int AreaCode;
int Exchange;
int Number;
};
int main(array<System::String ^> ^args)
{
phone Phone2 = {999,999,0099}; //error occurs here
phone Phone1 = {999,999,9999}; //works fine
return 0;
}
The error message I get is error C2041: illegal digit '9' for base '8'. Is my complier messed up or something? Thanks.
-
Numbers with leading zeroes are handling as octal (base 8). Obviously, there is no "9" in base 8 computations. Lose the leading zeroes or handle them as something other than numbers.
-
> int main(array<System::String ^> ^args)
What kind of dope-induced brain damage is this?
-
That seems like managed C++ to me. *rolls eyes*
-
Certainly looks s/man/dam/g to me :)