How do I allocate a class (using new) when that class has a nested abstract class?
<p>I'm new to C++ and am porting over code from Java.  I have a renderer class which has a method that takes an interface as an argument.  This way the caller can define how to render its buffers.  Now I'm running into trouble when I try to 'new' the ported over class.  I get the error 'allocating an object of abstract class type'.  This is the part of my code that I think I need to do something about:</p>

<pre><code>// Interface to the OpenGL ES renderer; consumed by GLView
struct IRenderingEngine {
virtual void initialize(int width, int height) = 0;
virtual void render() const = 0;
virtual ~IRenderingEngine() {}
};

class Renderer : public IRenderingEngine
{
public:
    ...

class IDrawGLBuffer
{
public:
    virtual ~IDrawGLBuffer() {};
    virtual void function(VBODescription vboDescription,
                          ShaderDescription shaderDescription);
};

class ShaderDescription
{
public:
    ShaderDescription(){};
    ShaderDescription(string vertexShaderText,
                      string fragmentShaderText,
                      map&lt;string,GLint&gt;&amp; variableMap,
                      IDrawGLBuffer&amp; callback,
                      int vertexDimensions);
    GLuint getProgramID() const {return shaderProgramID;};
    int getVertexDimensions() const {return vertexDimensions;};
    friend class Renderer;
private:
    string vertexShaderText;
    string fragmentShaderText;
    GLuint shaderProgramID;
    IDrawGLBuffer callback;
    int vertexDimensions;
    map&lt;string,GLint&gt; variableMap;
};

class VBODescription
{
public:
    VBODescription(){};
    VBODescription(string shaderName,
                   map&lt;string, Buffer&gt;&amp; variableMap,
                   GLenum usage,
                   int indexTotal,
                   GLuint textureID);
    int getIndexTotal() const {return indexTotal;};
    GLuint getTextureID() const {return textureID;};
    friend class Renderer;
private:
    GLenum usage;
    map&lt;string, Buffer&gt; variableMap;
    string shaderName;
    int indexTotal;
    GLuint textureID;

};

    ...

};
</code></pre>
