extern “C” Default argument works or not?
问题 From Here it seems that default argument are not supported by C. I have the following method in exported library: extern "C" { __declspec (dllexport) uintptr_t Method(int freq, int *pRetval, bool *support2MHz); } If i made last argument optional like this: extern "C" { __declspec (dllexport) uintptr_t Method(int freq, int *pRetval, bool *support2MHz = NULL); } My dll is still compiled. My question is why? Everyone says the default arguments are not supported in C code. I use C++ for MS 2015.