I think it's better to paste your code here. Anyway, it looks like a buffer overflow problem. The problem is that sizeof works in the way you are using it only in the same scope of the array. You can...