I understand the prototype and the for statement. But i'm confused on how it works. Each time I build my code I receive an error stating "no match for operator>>".
1 2 3 4 5 6 7
int ArrayA(ofstream& outF, ifstream& inF, int x, int n)
{
inF.open("numbers2.in");
for(x=0;x<n;x++)
inF>>ArrayA[x];
return ArrayA[];
}
It would be helpful if you posted as much of the code as needed to get a compile-able example. Posting very short code snippets only could be hiding where the real problems are in other parts of your code you don't let us see.
Furry Guy, I have posted the full code, unsure how to show you a direct link. But it's on the thread, or if you click my name it should show you my latest thread post, I believe.
Repeater, I am very green and unsure of myself when it comes to coding. My professor lectures and writes snips of code on the board and expects us to know everything. Once I get home with my assignments and sit down with them, that's when all my questions arise. So please, bare with me as I truly don't understand waht I am doing within my codes.
Jonin, I appreciate the advice, as of right now my professor wants us to use Arrays and read from a file and print to a file. No more cout or cin is allowed in our codes, we must use functions for everything also. Which causes more headaches, as i'm thinking its difficult for me to use functions and arrays and keep everything in order.