TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: TIM HUTZLER
from: MARIO SEMO
date: 1998-04-29 15:05:00
subject: Default constructor

Hallo Tim!
Antwort auf eine Message von Tim Hutzler an Rene Herman:
 TH> Every class MUST have a default constructor. But, if a default
 TH> constructor (no args) is not specified in your code, the compiler will
 TH> create one for you. That's why there was no error. ___ Blue Wave/QWK
huh. where is this documented??
eq:
======================
// unconstructable class : no default Ctor,  1 public ctor not implemented...
class Test
{
 public:
    Test(int);  // not implemented. no reason ....
};
int main(int argc, char *argv[])
{
 Test t;
}
==============
x1.cpp(9:7) : error EDC3070: Call does not match any argument list for 
"Test::Test".
this means there is NO default ctor!
Servus, Mario!
--- FleetStreet 1.21 PR#2
2:310/14.11)
---------------
* Origin: LC/32 Development Team, KirchnerSoft, Vienna, Austria

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™.