2008/2/29, CleverSwine <[EMAIL PROTECTED]>: > > > Antonio Petrelli wrote: > > Err... Does C++ have interfaces at all? All I recall is that C++ has > > classes. > > > Of course it does. A simple google search > (http://www.google.com/search?hl=en&q=C%2B%2B+interfaces&btnG=Google+Search) > would have shown you. Perhaps you're thinking of C.
The first result: http://www.codeguru.com/cpp/cpp/cpp_mfc/oop/article.php/c9989/ Contains this piece of code: <snip> #define Interface class #define DeclareInterface(name) Interface name { \ public: \ virtual ~name() {} #define DeclareBasedInterface(name, base) class name : public base { \ public: \ virtual ~name() {} #define EndInterface }; #define implements public </snip> So I was right, C++ does not have interfaces, it uses only a trick to use them! I think this is definitely a candidate for thedailywtf.com :-D Antonio --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]