首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

种模板运用之实现委托类

2013-02-20 
类模板运用之实现委托类#include header.hclass Test{public:void f( int a ){ cout Test: a

类模板运用之实现委托类

#include "header.h"class Test{public:void f( int a ){ cout << "Test:" << a << endl; }};int main(){Test *t = new Test;C<Test, int> c(t, &Test::f );c.invoke(3);delete t;}/*T1:class TestT2:void (__thiscall Test::*)(int)Test:3请按任意键继续. . .*/
强大的设计模式啊,超方便的说。。。



热点排行