tag:blogger.com,1999:blog-18724657.post115010761674245818..comments2024-01-04T16:54:58.646-08:00Comments on Andrei's blog: small C++ things to rememberAndrei Nitescuhttp://www.blogger.com/profile/17106850549627677414noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-18724657.post-1150439141967466252006-06-15T23:25:00.000-07:002006-06-15T23:25:00.000-07:00The base class from which each class is derived is...The base class from which each class is derived is declared before the declaration of the derived class. It is not sufficient to provide a forward-referencing declaration for a base class; it must be a complete declaration.<BR/><BR/>for example:<BR/><BR/>class A; // forward declaration<BR/><BR/><BR/>// compile error; A must be defined<BR/>class B : public A<BR/>{<BR/><BR/>};<BR/><BR/>class A<BR/>{<BR/>};Andrei Nitescuhttps://www.blogger.com/profile/17106850549627677414noreply@blogger.comtag:blogger.com,1999:blog-18724657.post-1150108884127285202006-06-12T03:41:00.000-07:002006-06-12T03:41:00.000-07:00the size of an empty class or structure is not zer...the size of an empty class or structure is not zero. it is one. <BR/><BR/>http://tinf2.vub.ac.be/~dvermeir/c++/emptyopt.htmlAndrei Nitescuhttps://www.blogger.com/profile/17106850549627677414noreply@blogger.com