Quote:Original post by _Zido_
Okay, i found the problem, and its alot simpler than all the other solutions.
The problem is here:
int row;
I changed it to:
int row=0;
And poof, it works.
The problem was when i set the variable it probably gets set to NULL. You cant have an array which is NULL. And therefore the program crashed =]
Thanks for everyones help anyways.
If you use uninitialized variables, their value is unprediceable, and not always NULL. Besides NULL==0 unless you #define NULL something_else.