How do I add a linked list or convert it to a linked list using a stack function
<pre><code>#include&lt;iostream&gt;

class Hanoi {
public:
  Hanoi();
  void solve(int, char, char, char);
};

Hanoi :: Hanoi() {
}

void Hanoi :: solve(int n, char from, char use, char to) {
  if (n &gt; 0) {
    solve(n-1, from, use, to);
    cout &lt;&lt; "Move disk " &lt;&lt; n &lt;&lt; " from " &lt;&lt; from &lt;&lt; " to " &lt;&lt; to &lt;&lt; endl;
    solve(n-1, use, to, from);
   }
}

int main(void) {
  Hanoi h;
  int N;
  cout &lt;&lt; "Enter number of disks : " &lt;&lt; endl;
  cin &gt;&gt; N;
  h.solve(N,'A','B','C');
  cin &gt;&gt; N;
}
</code></pre>
