Compiling C++ on MacOS9.1 question

This is a discussion on Compiling C++ on MacOS9.1 question within the C++ Programming forums, part of the General Programming Boards category; At school we are stuck with iMacs running macOS9.1 and Codewarrior IDE 4.1. Anyways, at home on my windows box ...

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    244

    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

  2. #2
    moi
    moi is offline
    Registered User moi's Avatar
    Join Date
    Jul 2002
    Posts
    946

    Re: Compiling C++ on MacOS9.1 question

    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
    hello, internet!

  3. #3
    Registered User
    Join Date
    Aug 2001
    Posts
    244

    Re: Re: Compiling C++ on MacOS9.1 question

    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++?


Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Question about linux compiling with GCC
    By elsheepo in forum C++ Programming
    Replies: 23
    Last Post: 03-07-2008, 11:36 PM
  2. Design layer question
    By mdoland in forum C# Programming
    Replies: 0
    Last Post: 10-19-2007, 05:22 AM
  3. Question with compiling
    By glory in death in forum C++ Programming
    Replies: 2
    Last Post: 04-06-2007, 07:02 PM
  4. opengl DC question
    By SAMSAM in forum Game Programming
    Replies: 6
    Last Post: 02-26-2003, 09:22 PM
  5. Simple Compiling question ...
    By hypertension in forum C++ Programming
    Replies: 2
    Last Post: 02-16-2003, 01:02 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21