void TestFunc() { } int _tmain(int argc, _TCHAR* argv[]) { cout<<TestFunc<<endl; cout<<&TestFunc<<endl; cout<<*TestFunc<<endl; cout<<*******TestFunc<<endl; }
可以看到输出的结果均为,函数名地址。这些操作在使用的时候,没有任何区别,可能更好的帮助大家理解函数指针和指针函数。
当然,大家也可以查看VS的反汇编,可以发现其实这些操作的汇编程序一模一样。