Code fails with linker error. Why?

John Colvin via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Oct 3 08:47:32 PDT 2014


On Friday, 3 October 2014 at 15:44:16 UTC, eles wrote:
> class ShapeSurface(T) {
> public:
> 	int formula();

that means you have a definition of formula elsewhere (which the 
linker tries to find, but obviously fails. What you want is

class ShapeSurface(T) {
public:
	abstract int formula();


More information about the Digitalmars-d-learn mailing list