title: How do you handle a "cannot instantiate abstract class" error in C++?
body: <p>How do you handle a "cannot instantiate abstract class" error in C++?
  I have looked at some of the similar errors here and none of them seem to be exactly the same or problem that I am having.  But, then again, I will admit that there are several to go over.  Here is the compile error:</p>
  
  <p><img src="https://i.stack.imgur.com/7idT9.png" alt="[IMG]http://i67.photobucket.com/albums/h292/Athono/cannotinstantiateabstractclass.png[/IMG]"></p>
  
  <p>This leads me to this page:
  <a href="http://msdn.microsoft.com/query/dev10.query?appId=Dev10IDEF1&amp;l=EN-US&amp;k=k(C2259);k(VS.ERRORLIST)&amp;rd=true" rel="noreferrer">http://msdn.microsoft.com/query/dev10.query?appId=Dev10IDEF1&amp;l=EN-US&amp;k=k(C2259);k(VS.ERRORLIST)&amp;rd=true</a>
  Compile Error C2259 is from a C++ program but the page calls the abstract class an "interface":</p>
  
  <blockquote>
    <p>Whenever you derive from an interface and implement the interface methods in the derived class with access permissions other than public, you may receive C2259. This occurs because the compiler expects the interface methods implemented in the derived class to have public access. When you implement the member functions for an interface with more restrictive access permissions, the compiler does not consider them to be implementations for the interface methods defined in the interface, which in turn makes the derived class an abstract class.</p>
    
    <p>There are two possible workarounds for the problem: </p>
    
    <p>Make the access permissions public for the implemented methods.</p>
    
    <p>Use the scope resolution operator for the interface methods implemented in the derived class to qualify the implemented method name with the name of the interface.</p>
  </blockquote>
  
  <p>The bad news is that I have already made all of the methods public in the class:</p>
  
  <pre><code>class AmbientOccluder: public Light {
      public:
  
          AmbientOccluder(void); 
  </code></pre>