Message-ID: <387C1508.5B5E9E0@mail.utexas.edu> From: Wei-shi Tsai X-Mailer: Mozilla 4.7 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: Allegro timers with C++ classes References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 31 Date: Wed, 12 Jan 2000 05:25:21 GMT NNTP-Posting-Host: 209.30.181.145 X-Complaints-To: abuse AT flash DOT net X-Trace: news.flash.net 947654721 209.30.181.145 (Tue, 11 Jan 2000 23:25:21 CST) NNTP-Posting-Date: Tue, 11 Jan 2000 23:25:21 CST Organization: FlashNet Communications, http://www.flash.net To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Matt Firewalker wrote: > Do the volatile ints used in Allegro's timing have to be global, or can they > be declared within a class (locked within the constructor)? Conversely, can > the handler functions be declared within a class as well (locked in > constructor, end in destructor)? If so, how would I design such a class? > > ~Matt F. I have found that the functions have to be global (someone correct me on this if I'm wrong). Everytime I have attempted to set up the timer handler to call a member function in a class, like install_int(&SomeClass::SomeFunction(), 1000); results in the error "error converting from 'void (SomeClass::*)()' to 'void (*)()' " -- Wei-shi Tsai e-mail: perdita AT mail DOT utexas DOT edu MoonieCode(1.8.11) SM:6-[8]m+ F:sMe++[+]>Mo+>:vNe+>Bl+<:aLu+[+]>Ry<:pR+>Cl< D:s:Ma<:vJa--