www.delorie.com/archives/browse.cgi | search |
Xref: | news2.mv.net comp.os.msdos.djgpp:2589 |
From: | kenfoo AT techm DOT pl DOT my (Kenneth Foo) |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | typedef struct inheritance -- not possible? |
Message-ID: | <828969663.273snx@techm.pl.my> |
Date: | Mon, 08 Apr 96 13:21:03 GMT |
Organization: | RDG |
Lines: | 45 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Why can't this work under DJGPP? It did work under Visual C++ and Turbo C++... typedef struct { int one; } BASE; typedef struct : BASE { int two; } DERIVED; Is this valid under ANSI C (c++?) ? What I'm trying to do is to derive a class called DERIVED from BASE. Hopefully, this avoids those silly constructors during creation. Note: My actual code was... typedef DWORD E3DBINARYHEADER; typedef struct { E3DBINARYHEADER Header; } bhCHUNK; typedef struct : bhCHUNK { CHAR Name[40]; } bhGROUP; typedef struct : bhGROUP { MAT3X4 TMat; MAT3X4 ITMat; } bhOBJECT; -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Kenneth Foo kenfoo AT techm DOT pl DOT my TechnoMaestro/RDG << Do what you think of. Think of what you do >> ----------------------------------------------------------------------------- Personal Homepage: http://www.lookup.com/Homepages/89431/home.html Renegade Demo Group hp: http://www.lookup.com/Homepages/89431/renegade.html -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |