From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: load_datafile in constructor Date: 27 Aug 2000 17:47:34 GMT Organization: Aachen University of Technology (RWTH) Lines: 14 Message-ID: <8obk7m$ej5$1@nets3.rz.RWTH-Aachen.DE> References: <39a93d13_4 AT spamkiller DOT newsfeeds DOT com> NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 967398454 14949 137.226.32.75 (27 Aug 2000 17:47:34 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 27 Aug 2000 17:47:34 GMT Originator: broeker@ To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com 23yrold3yrold wrote: > Hello. Why is it that you can't load_datafile in a class constructor? I'm not 100% certain on the terminology, here, but: it *should* definitely be possible to do that, but not if the constructor is called for a static object. Static objects are constructed before even main() has begun to execute, so allegro_init() will not have been done, yet --> boom. Solution, if that's your problem: don't use a static object. Use a dynamic object, or don't use the usual constructor to set it up. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.