Prev: Is the Mixin pattern accepted in all camps?
Next: will taking the address of the first element of a string break COW strings?
From: liam_herron on 6 Jul 2010 11:18 Why does this compile when I define the body of the constructor in the header versus when I define the body of the constructor in the cpp file? // Works class A { public: A() {f();} virtual ~A() {} virtual void f() = 0; int a1_; }; // Generates Linker Error class A2 { public: A2(); virtual ~A2() {} virtual void f() = 0; int a2_; }; -- [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] |