TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: CHRISTOPHER BUTLER
from: RICHARD HIRNER
date: 1997-11-08 21:57:00
subject: address of member func.

Hello Christopher!
CB>How do I get the address of a member function?
CB>For example:
CB>class foo
CB>{
CB> public:
CB>    foo();
CB>    void interrupt myInt(...)
CB>}
CB>foo::foo()
CB>{
CB>    _dos_setvect(0x1C, &myInt); // Here is where I want to get the address 
o
CB>                                // the member function myInt...
CB>                                // What I've put is obviously incorrect, 
s
CB>                                // TC says its wrong.. so how /do/ I do 
t?
CB>}
for DOS-Borland C++ 3.1
class foo
{
    public:
        foo();
        static void interrupt myInt(...);
};
foo::foo()
{
        setvect(0x1C, &myInt);
}
bye
 Richard
___
 X SLMR 2.1a X BIOS error - press F13 to continue ...
--- Maximus/2 3.01
---------------
* Origin: Constants aren't (2:310/3)

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