[Solved] i want to copy strings from file into a variable 2d char [closed]
I can spot following problems: The first rewind(fp); is useless and wrong. Useless because after opening the file, the file pointer it is already at the beginning, and wrong because if the file could not be opened for some reason, fp is NULL and rewind(NULL) is undefined behaviour, most likely you’ll get a crash. The … Read more