LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1042|回复: 2

怎样取得类内的成员函数指针?

[复制链接]
发表于 2003-3-3 08:58:10 | 显示全部楼层 |阅读模式
class myclass
{
  protected:
      bool t;

  public:
      myclass() { t = true; }
      myclass(bool al) { t = al; }
      ~myclass();

      bool GetT() { return t; }
/*  我应该怎样取得这个函数指针
    bool (*funcptr)();???????
*/
      ......
}
发表于 2003-3-3 12:17:49 | 显示全部楼层
这么做有什么意义吗?
发表于 2003-3-5 05:37:02 | 显示全部楼层
静态函数的很容易。
成员函数的指针不要取。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表