I am using Visual Studio 2017 and I set the project to use ISO C++14 Standard under C/C++->Languages
The debugger cannot recognize __func__
predefined identifier and it crashes if I try to use it as a string with error:
: Access violation reading location 0xFFFFFFFFFFFFFFFF
What am I missing to be able to use this identifier?
Code sample if needed
printf("%S\n", __func__);
Thanks
printf()
with a capitalS
as a conversion specifier is an extension that requires awchar_t*
.Solution, use a lowercase
s
:or