Compiling C++ on MacOS9.1 question
At school we are stuck with iMacs running macOS9.1 and Codewarrior IDE 4.1.
Anyways, at home on my windows box I wrote some code where the user inputs a value, its stored in an int value, and then an array is created like so:
Code:
int a;
cin >> a;
int Array[8][a];
It compiled with no troubles on my windows box, but the mac said something about illegal constant expression I believe.
Is this a quirk of Codewarrior or MacOS? And is what I did actually "legal"or did the wiindows machines just let me get away with?
Thanks
Re: Compiling C++ on MacOS9.1 question
Quote:
Originally posted by Captain Penguin
At school we are stuck with iMacs running macOS9.1 and Codewarrior IDE 4.1.
Anyways, at home on my windows box I wrote some code where the user inputs a value, its stored in an int value, and then an array is created like so:
Code:
int a;
cin >> a;
int Array[8][a];
It compiled with no troubles on my windows box, but the mac said something about illegal constant expression I believe.
Is this a quirk of Codewarrior or MacOS? And is what I did actually "legal"or did the wiindows machines just let me get away with?
Thanks
if the above code works its because of compiler specific extentions i believe
Re: Re: Compiling C++ on MacOS9.1 question
Quote:
Originally posted by moi
if the above code works its because of compiler specific extentions i believe
So that wouldn't be accepted as "standard" C++?
:eek: