Hi, Well, I'd recommend you having a look at how the graphical toolkit GTK do it. It's mainly written in pure C and is said to be object-oriented architectured, so maybe you could learn from it. http://www.gtk.org/
Second, for example, I grabbed it on google : http://www.accu.org/acornsig/public/articles/oop_c.html (http://www.google.com/search?q=C+object-oriented). I seem to remember one of the main principle used in object-oriented C is to declare structures containing data, and pointers to your functions (i.e. methods). Obviously, I think you'll miss real encapsulation, 'cause you there's no visibility level that you can set in C. But that's already a good start. Hope this helps. @++ Baptiste > -----Message d'origine----- > De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] la part de > Li Xinyi > Envoyé : vendredi 28 avril 2006 04:15 > À : [email protected] > Objet : [patterns-discussion] how to implement design patterns using clanguage > > > Hi, guys > > I am new to design patterns, and just start to learn it by picking up the > book, head first design patterns. > I worked for an embedded software company. Unfortuantely here I dont have any > object oriented programming language > available. > I am wondering, is there any resource explaining how to implement the design > patterns using c language. > > Best Regards, > Ryan _______________________________________________ patterns-discussion mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/patterns-discussion
