By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,159 Members | 882 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,159 IT Pros & Developers. It's quick & easy.

using protected members of classes in C files

P: 3
I am trying to provide interface between C and C++ files.
I am providing wrapper classes. Some classes contain protected members.
Please suggest me how to use or ignore these protected members of the core classes in wrapper classes.
I used "typedef struct" for the classes which had only public members. But now I m facing problem with classes having protected members also.
Feb 23 '07 #1
Share this Question
Share on Google+
3 Replies


DeMan
100+
P: 1,806
I'm not entirely sure what the question is but you can conditionally compile different parts of your code by using #if, and #ifdef
Feb 23 '07 #2

10K+
P: 13,264
I am trying to provide interface between C and C++ files.
I am providing wrapper classes. Some classes contain protected members.
Please suggest me how to use or ignore these protected members of the core classes in wrapper classes.
I used "typedef struct" for the classes which had only public members. But now I m facing problem with classes having protected members also.
You appreciate of course that not all C++ code can be represented with C code?
Feb 23 '07 #3

P: 3
You appreciate of course that not all C++ code can be represented with C code?
I have to make wrapper classes(actually functions) for the classes which have protected members also. I know its not possible to represent everything in C, but is there anyway that I can ignore the protected members of the class when I treat the class as "struct" in C files?
Feb 23 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.