extern C and struct method

Viewed 7511

Given the following C++ code,

#ifdef __cplusplus
extern "C" {
#endif
        struct foo {
                void getNum() { 
                }
        };
#ifdef __cplusplus
}
#endif

int main (int argc, char * const argv[]) {
        return 0 ;
}

Is it possible to call getNum() from C?

4 Answers
Related