How about this...
/* ... */
struct xxx {
#if defined(C_PLUS_PLUS)
private:
#endif
/* the private variables to be declared
* ...
*/
#if defined(C_PLUS_PLUS)
/* the private functions (if any)
* ...
*/
protected:
/* the protected functions (if any)
* ...
*/
#endif
/* the protected variables (if any)
*
*/
#if defined(C_PLUS_PLUS)
public:
/* the public functions (if any)
*
*/
#endif
/* the public variables (if any)
* ...
*/
};
/* ... */
In this way, if its C then you will get a structure with all the variables available (publicly!), and if it is C++ it will be a just like the class required. Although, if you make all the variables available in C (you have to, in case you want to use them), then a basic concept of OOP, data hiding is violated (I guess). But then you got to do what you got to do!!;-)
But you don't get the functions in this way.:-( Ankan.
Please do correct me if I am wrong. s-)