Is extern "C" allowed on C ++ functions?

Possible duplicate:
In a C ++ source, what is the effect of extern "C"?

I ask about this because I am writing a C ++ program that uses the C library. This library has foreach functions that perform a callback (naturally). Obviously, the library will call my callbacks as functions of C.

First of all, does this have anything to do with C vs C ++ binding?

If so, is something like this right and right?

 extern "C" static bool callback(/*parameters*/) { cout << "C++ thing inside the function" << endl; /* etc */ } 
+6
source share

All Articles