class in cprograming ??????

R

ramtin

hi all,
i want to implement a class and inheritance in c programing , i
couldent fined enogh notes a bout that on the internet , if you have
text for learning that pls send it for me
thanks
 
I

Ian Collins

hi all,
i want to implement a class and inheritance in c programing , i
couldent fined enogh notes a bout that on the internet , if you have
text for learning that pls send it for me
thanks

Try refining your search, there are plenty of good papers and
discussions out there.
 
J

Jorgen Grahn

hi all,
i want to implement a class and inheritance in c programing ,

Why not use C++ if you need inheritance?

If you want to use C anyway: stay away from simulating inheritance
unless you desperately need it. I have never seen it done well.

On the other hand, "classes" without inheritance can be a good design
technique for C, and it's easy to do:

constructor: int Foo_create(struct Foo*);
destructor: void Foo_destroy(struct Foo*);
Foo::bar(...): ... Foo_bar(struct Foo*, ...);
Foo::baz(...) const: ... Foo_baz(const struct Foo*, ...);

/Jorgen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,952
Messages
2,570,111
Members
46,695
Latest member
Juliane58C

Latest Threads

Top