Not too long ago I saw a post about recursive functions, one of them had a rather odd name: SolveHanoi. Naturally, I googled the subject and found a neat mathemathical puzzle. Unwilling to build a little wooden puzzle myself, I decided to simulate it in a console app (this is just some small program that I don't intend to release, and since outputting of stl containers is already defined, there are no hackish displays tricks going on, so don't complain about the console.) I thought I would make it so, that every "staff" is a vector of unsigned's, in which the unsigned integer represents the bigness of the ring at that place. To make it work in a LIFO context, I used a vector with push_back and pop_back, because it enables me to have random access to all elements, which makes it easier to create a drawing code. I put all vectors of unsigneds into a new unsigned, which represents the game board on which rings can be exchanged. Unfortunately, I didn't get it to work. Here is my code:
Thanks, changed it, it works now! I just could not sort this error out because I was using Dev-Cpp (I was at school at the time, I had to have a lightweight IDE with me, I put this one on my USB drive).