#include<iostream> using namespace std; double a(double aa) { return aa; } int main() {int aa = 9; a(1.0); double(*fn)(double) = a;; cout << a(1.0)<<endl; cout << fn(1.0) << endl; cout << fn << endl; cout << &fn << endl; cout << *fn << endl; }
结果:
1 1 00821488 00F3FB70 00821488
c++程序设计基础、编程抽象与算法策略