Hi there, I'm trying to pass these numbers into the array using the for loop: 1, 2, 3, 4, 5. I created two files in my project called "inStuff.txt" and "OUTPUTS.txt". I know I have an error at my input in the for loop, can someone please point me to some example which is a bit similar to my problem or something? I'm also on linux using a crossGCC complier(not sure if that makes a difference).
On line 20 - what are you trying to do there? You probably want to change that whole for loop to be like this:
1 2
for (index = 0; index < 5; ++index)
inFile >> scoresAr[index];
Of course, I'm not actually sure what you are trying to do here. If you give some more explanation on what you are trying to input from the file, that could be beneficial.
No real reason in this case, its just force of habit for me (its the way I automatically do it). In theory, in some cases, it can be slightly more efficient to do a preincrement rather than a postincrement. Do which ever one you want.