#ifndef action_h
#define action_h
#include <Windows.h>
#include <gl/GL.h>
//#pragma comment(lib, "opengl32.lib")
//#pragma comment(lib, "glu32.lib")
// The action to be performed
class action{
public:
// Virtuall destructor for abract class
virtual ~action(){};
// The operation to be performed
virtualvoid operation()=0;
};
#endif action_h
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#ifndef forward_h
#define forward_h
#include "action.h"
// Move forward and draw
class forward : public action
{
public:
forward();
~forward();
// Operation move forward and draw
void operation(int);
};
#endif foward_h
From what I have read thus far in my programming book as soon as you do any function as:
virtual void someFunction(int param) = 0;
Then it is a pure virtual function which makes the class an abstract class. If you are trying to call someFunction with the base class it may give the error as pure virtual functions have no definitions in the base class. If you are calling that with an object that may be the problem. This is just a guess without seeing the whole code.
[EDIT]
Looking at the code, it is the full code. I'm not really seeing why the compiler is saying that because the way you do everything looks like how my book has its example (minus the OpenGL code).