void TestFunc()
{

}

int _tmain(int argc, _TCHAR* argv[])
{
      cout<<TestFunc<<endl;
      cout<<&TestFunc<<endl;
      cout<<*TestFunc<<endl;
      cout<<*******TestFunc<<endl;
}            

可以看到输出的结果均为,函数名地址。这些操作在使用的时候,没有任何区别,可能更好的帮助大家理解函数指针和指针函数。

当然,大家也可以查看VS的反汇编,可以发现其实这些操作的汇编程序一模一样。

相关文章:

  • 2022-12-23
  • 2021-09-09
  • 2021-09-06
  • 2021-11-18
  • 2022-12-23
猜你喜欢
  • 2022-02-02
  • 2021-11-23
  • 2022-12-23
  • 2021-07-06
  • 2021-12-13
  • 2022-12-23
相关资源
相似解决方案