Huh... i found what was the problem, so if anyone is interested - here we go:
At first, my question did not reflect my problem:
I posted:
while in my program it was:
so this is where i got
"happens when the allocated memory for the array doesn't fit with the resolution" (c) JazzDNow when i corrected this stupid mistake, i received a "stack overflow" error in the debugger (note: this time it was at run-time, but not during the compilation).
Finally, making use of the dynamic allocation (just once - at the start of the program), i received the correct result :)
Thanks everybody for help!