Message-ID: <3631DF43.4D49212F@montana.com> Date: Sat, 24 Oct 1998 08:08:03 -0600 From: bowman X-Mailer: Mozilla 4.5b2 [en] (Win95; I) X-Accept-Language: en MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: construction has been delayed due to somebody's stupidity (most likely my own) References: <5zeY1.843$SI2 DOT 270 AT news DOT cwix DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com Jason Glass wrote: > > anyways, could somebody please tell me what's going on.. thanks a bunch. lose the parens and things will go better. Note that in the following snippet, you could leave the parameterless ctor out completely and the default ctor would work, if there was no declaration of a ctor with parameters. I would say your other compilers are broken, but I'm not a C++ language lawyer. <------------------------------- snippet -----------------------------------> #include class MyClass { public: MyClass() {}; MyClass(int val); int get_data(); void put_data(int val); protected: int data; }; MyClass::MyClass(int val) { data = val; } int MyClass::get_data(void) { return data; } void MyClass::put_data(int val) { data = val; } int main(void) { MyClass junk; MyClass more_junk(4321); junk.put_data(1234); cout << "junk = " << junk.get_data() << endl; cout << "more_junk = " << more_junk.get_data() << endl; return 0; }