🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by K3EES4_SU Thu, 21 Jan 1993 23:03
G++
#1392
Author: K3EES4_SU
Date: Thu, 21 Jan 1993 23:03
60 lines
1704 bytes
From:	NAME: K3/EES4-Schulz Kay            
	FUNC: K3/EES4                         
	TEL: 0711/811-20993                   <K3EES4_SU@SIIKS_A1@SIIKS>
To:	in%"gnu-g++@prep.ai.mit.edu"@gxlink

Dear Ladies and Gentlemen,
I am developping on an Ultrix 4.2 and I use your 
g++ 1.4
and gcc 2.1

I can't read news so I have a question if the following is a 
bug of this old version or not!

I have a base class and a derived class. I use destructors:
e.g.
class A
{
	A(); //Constr.
	virtual ~A(); //DESTR.
	//body
}
class B:public A
{
	B();	//Constr.
	~B():	//Destr.
	//more code
}
Stroustrup says this should work, it produces the following output:
_$_8A
_$_20B

Why?
If I use this:
class A
{
	A();
	~A();
	//virtual functions following
}
class B
{
	B();
	//code for virtual functions in class a or definition
}
I get the output:
warning: class A has virtual functions but non-virtual destructor.

I need help, else I can't go on working, or only withou
destructors . Is a bug of your compiler or linker and is fixed
in the newer versions or is it a feature or is it correct?

Thanks

KAY SCHULZ
k3ees4_su@siiks_a1.bosch.de
Falkenweg 9
7120 Bietigheim-Bissingen
GERMANY
Tel. private: 0049714265643
Tel. Job: 004971181120993
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads