CR>> Not necessarily although it does pose some problems with error
CR>> handling (which you could do with exceptions). Your options are to
FA> I've been thinking about this for a while, is there a technical reason
FA> why constructors are not able to return a value ?
because they either already return `this' through a `new' statement,
either they return `*this' through a non-dynamic use, or either is part
of a non-expression.
1. Chose * blah = new Chose(1,2,3);
2. Chose blah = Chose (1,2,3);
3. Chose blah(1,2,3);
these are the 3 allowed things, and since they only differ by their
returns, that stuff is handled secretly by the compiler and it's not
even called overloading.
matju
--- Terminate 4.00/Pro
---------------
* Origin: The Lost Remains Of SatelliteSoft BBS (1:163/215.42)
|