Isn't it time to learn to use a debugger which will help you to find the errors in your program yourself?

At least you would be able to tell us where the program crashes instead of telling us that...