Re: [CODE] Struct in C++?

From: George (greerga@DRAGON.HAM.MUOHIO.EDU)
Date: 08/31/97

On Sun, 31 Aug 1997, David Eliott wrote:

>Everyone keeps talking about how I dont need the struct word in C++, but
>then they say I do need it in some places?? What is the deal with this?
>Do I leave them, or do I remove them?
struct foo {
  int thing;

foo foovar;

It works, but a) you might not remember what foo is without 'struct' and b)
it's not compatible with C.  Although it does serve for a little bit
better abstraction although if you really want it, you could typedef it in
C anyway.

I'd vote leave it unless you like abtract.

George Greer  -   | Genius may have its limitations, but stupidity | is not thus handicapped. -- Elbert Hubbard

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

This archive was generated by hypermail 2b30 : 12/08/00 PST