Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!clyde.concordia.ca!nstn.ns.ca!news.cs.indiana.edu!spool.mu.edu!snorkelwacker.mit.edu!bloom-picayune.mit.edu!ahodgson From: ahodgson@athena.mit.edu (Antony Hodgson) Newsgroups: comp.lang.c++ Subject: Interrupt member functions Message-ID: <1991Feb19.191356.25123@athena.mit.edu> Date: 19 Feb 91 19:13:56 GMT Sender: news@athena.mit.edu (News system) Organization: Massachusetts Institute of Technology Lines: 32 Is it possible to have a class member function of type "interrupt"? E.g., I want to do something like the following: class InterruptHandler { public: InterruptHandler(); void install( int InterruptNumber ); void interrupt handler(); ... }; void InterruptHandler::install( int InterruptNumber ) { ... setvect( InterruptNumber, InterruptHandler::handler ); ... } Turbo C++ accepts the class declaration, but returns a type mismatch message when it hits the setvect call. Apparently, handler is not something it can deal with. If I define another handler routine that's not a member function, all is well (e.g., void altHandler();) and I can properly install it. What am I missing here? Another thing I would like to be able to do would be to pass an argument to handler when it gets invoked (e.g., handler( someObject O ) ). Is there any way this can be done? I will be very grateful for help with these questions. Tony Hodgson ahodgson@hstbme.mit.edu