title: How to call function from a two-level inherited class in C++?
body: <p>I got a main program in prog2.cpp</p>
  
  <pre><code>#include "stack1.h"
  int main(void){
  stack1 x(100); // Declare a stack1 x of length 100
  ......
  }
  </code></pre>
  
  <p>And I need to call this stack1 from stack1.h, but this original function is from stack.h, with is a parent class of stack1.h:</p>
  
  <pre><code>class stack
  {
  ....
  public:
  stack(int length);
  ....
  }
  </code></pre>
  
  <p>stack1.h is now looking like this:</p>
  
  <pre><code>#include "stack.h"
  class stack1: public stack{
  ...... //irrelevant code
  }
  </code></pre>
  
  <p>Problem is stack1 x(100) got an error from MVS saying:</p>
  
  <blockquote>
    <p>Error: no instance of constructor "stack1::stack1" matches the argument list.</p>
  </blockquote>
  
  <p>I've tried many ways to get rid of this but it always led to more problems. How do I fix this?</p>