I\'m taking a programming languages course and we\'re talking about the extern \"C\"
declaration.
How does this declaration work at a deeper level othe
It should be noted that extern "C"
also modifies the types of functions. It does not only modify things on lower levels:
extern "C" typedef void (*function_ptr_t)();
void foo();
int main() { function_ptr_t fptr = &foo; } // error!
The type of &foo
does not equal the type that the typedef designates (although the code is accepted by some, but not all compilers).