View Single Post
jaeezzy's Avatar
Posts: 664 | Thanked: 160 times | Joined on Jul 2008 @ Australia
#4
Originally Posted by Joorin View Post
Code:
mode = (char *) malloc(sizeof(char*));
What are you allocating here?
memory to store string which is read from the file and stored in array of char.

EDIT: I can't believe it, I thought it was needed but it was the source of problem damn me.... THANK YOU.

Last edited by jaeezzy; 2010-06-13 at 09:18.