Thread View: gnu.g++.bug
1 messages
1 total messages
Started by gerry wiener
Thu, 30 Mar 1989 16:44
constructor problem with g++1.34 on sun4-os4
Author: gerry wiener
Date: Thu, 30 Mar 1989 16:44
Date: Thu, 30 Mar 1989 16:44
43 lines
927 bytes
927 bytes
I believe the following program should print
Initialize
Hello, world
Clean up
Instead it prints
Hello, world
Clean up
If the definition of y is placed inside main(), then the program prints
Initialize
Hello, world
Clean up
------------------------------------------------------------------------------
#include <stream.h>
class x
{
public:
x();
~x();
};
x::x()
{
cout << "Initialize" << "\n";
}
x::~x()
{
cout << "Clean up" << "\n";
}
x y;
main()
{
cout << "Hello, world\n";
}
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