Ok, so I've recently been learning to code in c++, but I'm getting a little confused on how you read files to functions.
For instance, say that I have one file with a list of other files in it. The information within the second set of files (each file) contains an integer, a character and a double.
The idea is to open the first file, loop through and open each file inside, reading each piece of information. I'm trying to learn about passing files to functions by value, so my thought was to make a prototype:
istream& getInfo(istream &, double &, char &, int &);
I understand that passing by value allows for a change to the original value in memory (not a copy), but I don't understand how I would go about reading and altering the information if I wanted to. Any help would be greatly appreciated! :) I'm looking for an explanation, and maybe an example in code. I'll be here to answer any questions as well.