Quote of the week
Posted Dec 11, 2004 12:51 UTC (Sat) by
mmutz (guest, #5642)
In reply to:
Quote of the week by kleptog
Parent article:
Quote of the week
The compiler needs to know at compile time all possible variations
of that class.
If this is true, please explain to me how on earth the compiler manages
to compile this code:
foo.h:
class Foo {
public:
virtual void f();
};
foo.cpp:
#include "foo.h"
void Foo::f() {}
bar.h:
#include "foo.h"
class Bar : public Foo {
public:
void f();
};
bar.cpp:
#include "bar.h"
void Bar::f() {}
using something like
cc -o foo.o -c foo.cpp
cc -o bar.o -c bar.cpp
cc -o foobar foo.o bar.o
(
Log in to post comments)