[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.c

class in cprograming ??????

ramtin

4/13/2011 6:51:00 AM

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
5 Answers

Ian Collins

4/13/2011 8:22:00 AM

0

On 04/13/11 06:50 PM, ramtin wrote:
> 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.

--
Ian Collins

dr.oktopus

4/13/2011 8:20:00 PM

0

Jorgen Grahn

4/16/2011 8:23:00 AM

0

On Wed, 2011-04-13, ramtin wrote:
> 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

--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .

China Blue Veins

4/16/2011 9:18:00 AM

0

In article <slrniqikfu.gtj.grahn+nntp@frailea.sa.invalid>,
Jorgen Grahn <grahn+nntp@snipabacken.se> wrote:

> On Wed, 2011-04-13, ramtin wrote:
> > hi all,
> > i want to implement a class and inheritance in c programing ,
>
> Why not use C++ if you need inheritance?

Because C++ is retarded.

--
Damn the living - It's a lovely life. I'm whoever you want me to be.
Silver silverware - Where is the love? At least I can stay in character.
Oval swimming pool - Where is the love? Annoying Usenet one post at a time.
Damn the living - It's a lovely life. I am in the Nile.

Ian Collins

4/16/2011 9:21:00 AM

0

On 04/16/11 09:17 PM, China Blue Nile wrote:
> In article<slrniqikfu.gtj.grahn+nntp@frailea.sa.invalid>,
> Jorgen Grahn<grahn+nntp@snipabacken.se> wrote:
>
>> On Wed, 2011-04-13, ramtin wrote:
>>> hi all,
>>> i want to implement a class and inheritance in c programing ,
>>
>> Why not use C++ if you need inheritance?
>
> Because C++ is retarded.

Another thoughtful contribution.

--
Ian Collins