I am gathering data into a char[][] array, then let a user choose which of those string to write to a file. So I'm doing for example
char arr[3][3]; // assume there are three different two-char long strings in there
FILE* f = fopen("file", "w");
fputs(arr[1], f);
fclose(f);
Now the problem is, I'm getting a segfault on the fputs()
call and I dont know why.
Any Ideas?