TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: TRAVIS HEIN
from: DARIN MCBRIDE
date: 1997-10-09 18:05:00
subject: function pointers

 TH> how do you implement function pointers in C++? I know 
 TH> there is a way to make a generic funciton pointer that 
 TH> points to functions.
You can't quite do it in C++.  Not always anyway.
For example:
int foo(); // of type "int (*)()"
class bar {
  static int foo(); // of type "int (*)()"
  int foo2();       // of type "int (bar::*)()"
  bar();            // no type
  ~bar();           // no type
  class inner {
    static int foo(); // of type "int (*)()"
    int foo2();       // of type "int (bar::inner::*)()"
  };
};
Hope this helps,
--- Maximus/2 3.01
---------------
* Origin: Tanktalus' Tower BBS (1:250/102)

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