I'm afraid you probably didn't, holtaf. Giving someone a solution to your problem is a temporary help at best: it can really hurt one's C++ skills in the long run if they don't take the time to carefully examine the solution and ask questions about it.