so iv'e been going in circles for a while now and i just gave up lol so it goes something like this.
there is this txt file on the inside it has:
student1
grade1
grade2
grade3
student2 .. and so on
so we have to read that info into an array ..the names go into a 1Darray and the grades go on 2Darrays
also the end result must go in a parallel array but thats not so hard
Oh, one serious problem that you do have is you declare: char student1[2][5][7];
But then you write: myFile >> student1[r][c][MAX_SIZE];
MAX_SIZE = 14 so you have: myFile >> student1[r][c][14];
You're writing to memory which is out of bounds. That means it could contain ANYTHING and could be over-written by anyone at any time. It is highly likely you will get a segmentation fault next time you run the program. I'd suggest making this a 2d array instead of a 3d array. Even better, I'd use vectors and structures.
thank you guys for your answers
i would use struct's and vectors but for this assignment i cant and i lack so much experience when it comes to working with files any way
i got ridoff the 3d arrays i wasn't even meant to use them :)
now one of the problems is ..is there a way to tell apart a char and an int inside a file?
because as far i as i can tell u can just read everything inside the file with char arrays? its 2:40 in the morning guys ima take a nap but thank you for the response in advance ill try to be up early