Challenges in writing wrappers for C++ functions so that they can be used from C code
问题 I am now writing wrappers for C++ functions, such that they can be used from C code. The idea is to compile the cpp files using g++ and the c files using gcc, then link them together (!), but exposing ONLY those functions that are needed, to the C programs, by making them available in a header file 'test.h' (or maybe test.hpp?), like so: (Note how I do not expose function 'vector Tokenize(const string& str,const string& delimiters)') test.h: /* Header can be read by both C+ and C compilers,