Ok thanks Jim. That explains alot.
Type: Posts; User: guyle
Ok thanks Jim. That explains alot.
Sorry I forgot to say I fixed that i=1. The output is still the same as previously posted.
I figured out the segmentation fault was when I freed the 2d array. The problem now is it is only printing half of the names.
Jim 3.6
Jake 4.0
Will 3.0
Sara 3.4
Mike 2.
This is the output I get...
This is a homework assignment where I have to read a file into a dynamically allocated 2d array. The file format is
10
Jim 3.6
Jake 4.0
Will 3.0
Sara 3.4
Mike 2.5
Ellen 2.9
Melissa 3.9
Eric...
Ok got it. I don't know how I didnt see that before. I gotta remember those terminal commands. Thanks Salem.
Fin and fout are declared globally if that answers the question. Fixed the "wr" in fopen also. I can post the whole program if you would like.
I have a lengthy homework assignment to create a file parser and return tokens. It is 95% finished except this one part. I have two options from the beginning. The user presses 1 or 2. Pressing 1...
Thanks for the help camel-man and std10093. I think I am on the right track now. I am going to use fgets. Ill post again if I have more questions.
I am new to C and this is a small part of my homework assignment. I have to read in a file consisting of students names and scores. I have to separate the names from the scores. I used 2 2d char...