__func__ C++11 function's local predefined variable, won't compile

一世执手 提交于 2019-12-01 15:56:40
congusbongus

MSVC's C99 support is quite poor in general; your best bet might be to use the MSVC-specific __FUNCTION__ macro. See this question for details: Cross-platform defining #define for macros __FUNCTION__ and __func__

Update (2015-06-22): Visual Studio 2015 supports __func__, see the blog post

Pranav Jogawade

Compile the program using C++11 standards as __func__ is C++11 feature.

So, compile it like:

g++ -std=c++11 foo.cpp -o foo
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!