struct ATypeDef [ 5 ] { float Name, Amount; };

Discussion in 'C++' started by Jeff Relf, May 22, 2004.

  1. Jeff Relf

    Jeff Relf Guest

    Hi all,

    In my .CPP file, I have a line like this:
    typedef struct { float Name, Amount; } ATypeDef [ 5 ];

    Which I later use like this: ATypeDef XXX[ 7 ];

    which is like doing this:
    struct { float Name, Amount; } XXX [ 7 ] [ 5 ];

    I know that I can't do this:
    struct ATypeDef [ 5 ] { float Name, Amount; };

    Is there some way to put the " typedef " on the left ?
     
    Jeff Relf, May 22, 2004
    #1
    1. Advertising

  2. "Jeff Relf" <> wrote in message
    news:smjmfix94ck7$...
    > Hi all,
    >
    > In my .CPP file, I have a line like this:
    > typedef struct { float Name, Amount; } ATypeDef [ 5 ];
    >
    > Which I later use like this: ATypeDef XXX[ 7 ];
    >
    > which is like doing this:
    > struct { float Name, Amount; } XXX [ 7 ] [ 5 ];
    >
    > I know that I can't do this:
    > struct ATypeDef [ 5 ] { float Name, Amount; };
    >
    > Is there some way to put the " typedef " on the left ?


    No.

    john
     
    John Harrison, May 22, 2004
    #2
    1. Advertising

  3. Jeff Relf

    Jeff Relf Guest

    Hi John Harrison,

    Re: My .CPP file and how you said I can't do something like:
    struct ATypeDef [ 5 ] { float Name, Amount; };

    Ok, Thanks much.
     
    Jeff Relf, May 22, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andy
    Replies:
    7
    Views:
    6,266
    Roedy Green
    May 10, 2004
  2. Jim West
    Replies:
    4
    Views:
    1,440
    Jeff Schwab
    Jan 16, 2004
  3. bd
    Replies:
    0
    Views:
    634
  4. Chris Fogelklou
    Replies:
    36
    Views:
    1,391
    Chris Fogelklou
    Apr 20, 2004
  5. Carsten Fuchs
    Replies:
    45
    Views:
    1,554
    James Kanze
    Oct 8, 2009
Loading...

Share This Page