I have defined a type like this:
typedef char sType[256];
and a function, with default parameter:
void foo(const sType param = NULL);
MinGW (g++ 4.8.0) compiles it without errors.
Instead, Visual Studio 2015 (Tools 14.0) gives the following error:
error C2040: 'sType': 'int' differs in levels of indirection from 'char [256]'
I tried to cast NULL
to const char[]
, but this leads to:
error C2440: 'type cast': cannot convert from 'int' to 'const char []'
Any hint? Thank you