typename的含义
摘要:下面的 template declarations(模板声明)中 class 和 typename 有什么不同? template class Widget; // uses "class" template class Widget; // uses "typename" 答案:...
阅读全文
posted @
2007-09-21 09:56
3D入魔
阅读(392)
推荐(0) 编辑
举例说明C++回调函数(callback)的使用 - 转帖
摘要:什么是回调函数(callback) 模块A有一个函数foo,它向模块B传递foo的地址,然后在B里面发生某种事件(event)时,通过从A里面传递过来的foo的地址调用foo,通知A发生了什么事情,让A作出相应反应。 那么我们就把foo称为回调函数。 例子: 回调函数是一个很有用,也很重要的概念。当发生某种事件时,系统或其他函数将会自动调用你定义的一段函数。回调...
阅读全文
posted @
2007-09-21 09:52
3D入魔
阅读(3407)
推荐(1) 编辑