1. Please use code tags. See http://cplusplus.com/articles/z13hAqkS/ for details.
2. You don't describe your problem. You must describe it for us to understand where you need help. I just don't go about running every piece of code in every thread. Actually, I rarely run code. Thankfully most of the time I can suggest solutions just by reading. So please state your problem clearly.