You could have many problems. Impossible for anyone to help without seeing the source code. Does it even compile? If it does compile that still doesn't mean it will execute the way you want it too. You would have to show the source code for anybody to have a chance of helping you.
