title: Class does not name a type in bison
body: <p>This is the beginning of the parser.ypp file </p>
  
  <pre><code>%{
      #include &lt;iostream&gt;
      #include "hw3_output.hpp"   
      using namespace std;
      using namespace output;
      extern int yylineno;
      extern int yylex();
      int yyparse();
      void output::errorSyn(int lineno);
      void yyerror(char const* s);
      output::TableStack* SymboleTableStack = new output::TableStack();
      SymboleTableStack-&gt;makeTable();
      output::offsetStack* st = new output::offsetStack();
      st-&gt;push(0);
  %}
  </code></pre>
  
  <p>This is my hw3_output.hpp file. I'm only showing the important parts:</p>
  
  <pre><code>    namespace output{
      class SymbolTable {
              vector&lt;std::shared_ptr&lt;SymbolNode&gt;&gt; Symbols;
          public:
              SymbolTable() : Symbols() {}
              void AddSymbolToTable(std::shared_ptr&lt;SymbolNode&gt; symbolNode) {
                  Symbols.push_back(symbolNode);
              }
      ....
  class TableStack {
      public:
          vector&lt;SymbolTable*&gt; stack;
          TableStack() :stack() {}
          SymbolTable* topTable()
          {
              return *(stack.begin() + stack.size() - 1);
          }
      class offsetStack
          {
          public:
              vector&lt;int&gt; stack;
              offsetStack() :stack() {}
  
          };
      }
  
  I keep getting the following error (and the same for the offsetStack)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/pjkAh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pjkAh.png" alt="na"></a></p>