I'm trying to pull names from one file, grades from another, and printing both to a third file. I've done similar things before and even tried to reuse some code, but I cannot get it to work.
1. When I use "cout" instead of "outData" the only thing that prints is "Student Name:". The rest is blank. I tried this without using loops and arrays but couldn't get anything to work. I have 10 names and 5 grades for each so I thought it would be easier and less time-consuming to use them.
I'd appreciate any help or tips you can provide. I'm new to C++, just started learning it in Jan/Feb. Thanks!
It's pretty much hard to see what is happening as there is no error-checking of any kind. Does the program terminate normally, rather than fail in some way?
Could you give samples of the contents of the two input files please.
How did you save the files? Have you gone to the command line, cd into the proper directory and list the directory? Do the files by chance look something like "Grades.txt.txt"?
Thanks everyone for your help. I ended up deleting the files and recreating them. Somewhere along the way I was mixing up the paths to the file but couldn't find where. Deleting the old ones and making new ones seemed to help.