Cin as a parameter?

Hello, my professor wants us to use cin and infile as parameters depending on the program arguments.

For example, if we have two arguments, one being a input file, we use infile as a parameter for functions and take data using inFile

But if there is only one program argument, he wants us to use cin as a parameter to change the function around.

Or something to that extent.

I was wondering if anyone could explain to me how this is supposed to work. That'd be great.
As far as I know cin is used for getting input from the keyboard, and inFile is a common way used to access info stored in a file already, using the #include <fstream> directive and doing something like
ifstream inFile;
to create a file object.

The only thing I can conclude that your professor wants is for you to convert a program from reading from a file to reading from the keyboard.
Topic archived. No new replies allowed.