摘要: 在比较基础的情况, 和 是可以交换的,也就是没什么差别: 和 是等价的。 但也意味着,有些特殊的情况 和 是有区别的。 The first one is in the case of dependent types. typename is used to declare when you are 阅读全文
posted @ 2020-05-03 10:47 zengzhaocheng 阅读(631) 评论(0) 推荐(0) 编辑
摘要: C++函数本身是可以作为参数传入函数的。 1.函数作为形参的语法格式 函数类型 (*自定义变量名)(形参1,形参2,...) 在这种情况下一定要加指针,加括号。 例1: void foo(void (*func)(int),int j) { func(j); } 其中void (*func)(int 阅读全文
posted @ 2020-05-03 10:02 zengzhaocheng 阅读(10865) 评论(1) 推荐(1) 编辑