摘要:
函数指针是指指向函数而非指向对象的指针。像其他指针一样,函数指针也指向某个特定的类型。函数类型由其返回类型以及形参表确定,而与函数名无关: // pf points to function returning bool that takes two const string references bool (*pf)(const string &, const string &);pf 声明为指向函数的指针,它所指向的函数带有两个 const string& 类型的形参和 bool 类型的返回值。*pf 两侧的圆括号是必需的: // declares a functio 阅读全文
posted @ 2013-05-13 16:23
HandsomeDragon
阅读(364)
评论(0)
推荐(0)

浙公网安备 33010602011771号