I'm using both c/c++ codes in VS2019
And float returning C++ function doesn't work in C code.
//C++ code
extern "C" float cppfunc()
{
return 1.0f;
}
//C code
void cfunc()
{
float val = cppfunc();
PRINT(val); // actually I look up the variable with debugger, And It seems like 21210656.0
}
I need some help.