I have char str[5000]; that has nothing in it.
I then have toCharArray(fp1, str);
void toCharArray(FILE *fp1, char *str) {
while(!feof(fp1)) {
fscanf(fp1, "%c", *(str++));
}
The program crashes with no error messages on the fscanf line. I am attempting to iterate through the array using the *(str++) statement and assigning values from the file to each element. I can go *(str++) = 'G'; *(str++) = 'H'; to my heart's content (and printf("%c", *(--str)); would return the correct values) but I can not use fscanf to seemingly do the same thing.