www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/06/17/19:22:25

Date: Fri, 16 Jun 1995 16:51:20 +0200
From: Peter_Schuette AT p19 DOT ks DOT fido DOT de (Peter Schuette)
Subject: pure virtual functions
To: djgpp AT sun DOT soe DOT clarkson DOT edu (djgpp)
Organization: Fido.DE domain gateway (IN e.V.)
Lines: 42

Hello!

I've a little problem with DJGPP 2.6.3 and pure virtual functions. Compiling
the source (down there) the compiler gives me a
    undefinded reference to '__pure_virtual'.

How can I define/declare a function as PURE VIRTUAL and overwrite it in a
derived class?

The guys in the german C_PLUSPLUS.GER couldn't help me. Is it a bug in GNU
C/C++?

cu Peter
Peter_Schuette AT ks DOT fido DOT de


#include <iostream.h>

class tVater {
public:
           tVater () {}
  virtual ~tVater () {}

  virtual void egal() = 0;
};

class tSohn : public tVater {
public:
           tSohn () {}
  virtual ~tSohn () {}

  virtual void egal();
};


void tSohn::egal() {
  cout << "juhu" << endl;
}

main() {
  tSohn s;
}

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019