TColors - gits

This is a discussion on TColors - gits within the C++ Programming forums, part of the General Programming Boards category; Can someone tell me what the hell is up with this, it is really getting on my nerves. I have ...

  1. #1
    Registered User subdene's Avatar
    Join Date
    Jan 2002
    Posts
    359

    Angry TColors - gits

    Can someone tell me what the hell is up with this, it is really getting on my nerves. I have a TColor pointer and dynamically allocating it within my class's constructor.

    Code:
      const int MAX_COLORS = 3;
    
      TColor  *Colors;
    
      Colors = new TColor[MAX_COLORS] = {clAqua, clBlack, clBlue};
    it keeps saying expression syntax.....

    any offers would be greatful thanks.
    Be a leader and not a follower.

  2. #2
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145

    Re: TColors - gits

    Originally posted by subdene
    Colors = new TColor[MAX_COLORS] = {clAqua, clBlack, clBlue};
    I doubt you can assign values like that...
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  3. #3
    Registered User subdene's Avatar
    Join Date
    Jan 2002
    Posts
    359
    so basically i'll have to create an empty TColor array and then assign each color manually, surely not.
    Be a leader and not a follower.

Popular pages Recent additions subscribe to a feed

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