 <p>All the problems boil down to the fact that the following declaration</p> <pre><code>slist&lt;int&gt; L; </code></pre> <p>throwed the error that</p> <p><code>slist</code> was not declared in this scope</p> <p>You need to make sure <code>slist</code> is declared in your scope. <code>include</code> the necessary headers.</p>