home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!wupost!gumby!destroyer!ncar!csn!news.den.mmc.com!jones@pogo.den.mmc.com
- From: jones@pogo.den.mmc.com (Jonathan Jones)
- Subject: Virtual Destructor Problem - Help
- Message-ID: <1992Nov17.224416.8961@den.mmc.com>
- Sender: news@den.mmc.com (News)
- Nntp-Posting-Host: 129.243.25.14
- Organization: Martin Marietta WIS
- Date: Tue, 17 Nov 1992 22:44:16 GMT
- Lines: 98
-
-
- ********************* Operating Enviroment **********************
-
- Running on a Macintosh IIfx
- System 7
- 8 meg. of memory
-
- MPW 3.2 -- E.T.O # 8
-
-
- We sent this problem to Apple by mail about 3 weeks ago, and to their Cplus.Bugs@AppleLink.Apple.Com a week ago.
- We have heard no response. Is this the Norm for Apple ?
-
- We would like to know if other people can reproduce the following problem ?
- Does anyone have ANY solution to it ?
-
-
- **************************** Problem **************************************************
-
- Put in either "virtual" or both "virtual"s on the destructors and the compiler will fail!!
-
- It will only compile, if "virtual" is removed from BOTH destructors.
-
-
-
-
- ************* Stripped Down Source Code *** Note: No Include File for this small Example ***
-
- class Object
- {
- public:
- virtual ~Object( void ) {}
- };
-
-
- class Bool : public Object
- {
- public:
- virtual ~Bool( void ) {}
- };
-
-
- void f3()
- {
- Bool *p = new Bool[10];
-
- delete [] p; // no size necessary
- }
-
-
- ********************* Compile line ****************************
-
- CPlus fileName.cpp
-
-
-
-
- ********************* Output from C compiler, gets past Cfront ****************************
- #
- #
- #?
- ### Error 211 Pointer type required
- #?
- ### Error 24 ')' expected
- #?
- ### Error 229 mismatch between formal and actual parameter types
- #?
- ### Error 258 There are not enough arguments
- #?
- ### Error 30 ';' expected
- #?
- ### Error 22 error in factor
- #?
- ### Error 212 Struct or Union type required
- #?
- ### Error 23 identifier not declared
- #--------------------------------------------------------------------------------------------------------------------------------
- File "HD:Cams:Tree:jjj.cpp"; Find Ñ!246:ñ!1; Open "{Target}"
- #--------------------------------------------------------------------------------------------------------------------------------
-
-
-
-
-
- *********************************************************************************
- *
- * From : Steve McCabe & Jonathan Jones
- * (303) 971-5124 (303) 971-5101
- *
- * Reply to : /s=McCabe/g=Steve/ou=msmail/o=den.mmag/prmd=mmc/admd=telemail/c=us/@x400
- *
- *********************************************************************************
-
-
-
-
-
-
-