typedef int (A::*Myfunction)(int); B* pB = new B; Myfunction pf = (Myfunction)(&B::Fb);
来源:互联网 发布:淘宝 衣神 编辑:程序博客网 时间:2024/06/05 07:20
// ImInDerived.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include<iostream>class A{public:A(){};virtual ~A(){};};class B : public A{public:B(){};~B(){};int Fb(int a){ return a*a;}};typedef int (A::*Myfunction)(int);int main(){B* pB = new B;Myfunction pf = (Myfunction)(&B::Fb);int retValue = (pB->*pf)(3);std::cout<<retValue<<std::endl;return 1;}
- typedef int (A::*Myfunction)(int); B* pB = new B; Myfunction pf = (Myfunction)(&B::Fb);
- 关于typedef int (*ADDPROC)(int a, int b)
- array_map(myfunction,array1,array2,array3...) array_walk(array,myfunction,userdata...)
- #include int inc(int a) { return(++a); } int multi(int*a,int*b,int*c) { return(*c=*a**b); }
- int a,b; a=077; b=a|3;
- ab翻转int a, b; a = int.Parse(txtbfirst.Text); b = int.Parse(txtbsecond.Text); a = a + b; b = a - b; a
- int & a = b 的 作用?
- int Random (int a, int b)
- PHP再线投票myfunction.php
- const int* a = &b 和 const* int a = &b的区别
- int a = 0 与 int a(0) int a(b)
- (int&)b
- int*a, int& b, int* &c, int& *d
- gcd(int a, int b) //求最大公约数
- int[] a与int b[] 一样吗
- return *(int*)b-*(int*)a意思
- pow(double a,int b)
- A *a=new B();
- 我的心得体会
- VB编程实验报告
- 【三月之春】CSS笔记之三
- Oracle触发器
- 北理工2012年计算机研究生复试上机题
- typedef int (A::*Myfunction)(int); B* pB = new B; Myfunction pf = (Myfunction)(&B::Fb);
- CSS 自动换行, 块级标签 变 行级标签
- 远程文件共享、制件启动盘,格式盘相关命令
- CSS 自动换行, 块级标签 变 行级标签
- 第六周实验报告(2)
- 鼠标样式和自定义
- initrd概述
- Iphone开发(四)文本框,文本视图,和软键盘的隐藏
- JAVA的学习之法