I would use my normal fgets and sscanf instead of fscanf as you are doing to get input from file.
The only example I found on this site of it in the FAQs FAQ > Validate user input -...
Type: Posts; User: stahta01
I would use my normal fgets and sscanf instead of fscanf as you are doing to get input from file.
The only example I found on this site of it in the FAQs FAQ > Validate user input -...
Fixed so it does not seg fault for me; still has logic errors.
The two lines that were obvious wrong to me.
student->first_name = malloc(sizeof(char) * MAX_CHARS_IN_NAME);
...
If you have given up; no reason to post.
If not, post your current code using either fixed size name C-String (char array) or using a for loop with dynamic memory for name C-string.
Tim S.
A year ago, I thought that but this sites mentions the topic about once every two months.
NOTE: I still believe it can be something other that 1 on NON C standard compilers.
Just to be a C...
6.5.3.4 The sizeof operator in PDF n1362.pdf (ISO/IEC 9899:201x)
in numbered sub-section/paragraph 3. In PDF n1570.pdf its is in numbered sub-section/paragraph 2.
Tim S.