TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: JERRY COFFIN
from: FRANK ADAM
date: 1997-09-07 11:04:00
subject: ctors

On Sep 02 09:52, 1997, Jerry Coffin of 1:128/166.5 wrote:
G'day Jerry,
FA>> may be initialized similarly to a structure,but once a user defined
FA>> ctor is used it becomes a definite (be it implicit) function call.
JC> quite closely related to structs in C.  In fact, the only fundamental
JC> difference is that C says you can't put a function in a struct.  C++
Yes, but my point was that there *is* a function within the class.In C
functions *can* return a value, in a class only member functions can. 
Actually is the ctor considered a member function or not ?
FA>> IMHO, all of a sudden the syntax 
FA>> just disallowed the checking of a return value from a function.
JC> The syntax `void funcname()' did that in C a long time ago. 
Yeah, but i can change that void to int and all i get is a compiler 
warning. :-)
FA>> int status;
FA>> someClass *object;
FA>> object = new someClass(&status);
FA>> someClass x(&status);
FA>> Of course there would be no "no arg" constructors.
JC> And there'd be no way to use this in conversion ctors, etc. either.
Got me, what's a "conversion ctor" ? 
Some of the terminology will get me every time.:-)
FA>> Anyway i was just thinking aloud, i don't think compiler vendors upon 
FA>> reading this, would rush off to change the language just for me.:-)
JC> Improvements are rarely finished the minute somebody first starts to
JC> discuss them.  I'm not _at_ _all_ averse to discussing things just
JC> becaue they're not finished and polished.  As I point out above, I 
Oh, ok to put it bluntly i was just pointing out that i'm not trying to be 
a smart allek. :-) 
My C++ is worse than my C, and you may have seen my C. ;-) 
 Regards, Frank
--- Msged 4.00
---------------
* Origin: The ticking point, Melbourne, Australia. (3:635/728.21)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.