I am working on a program for class and the algorithm provided by the teacher says we have a function string ReadMedia (istream &input);
now.. how exactly do i use this as an input stream in the funtion?
we dont know whether the input will be a file or a user input. we only know that the stream is open? I am at a stuck point.. yet again -_-
You can use it exactly as if it was any other istream
eg: if you have to do something like this:
cin >> x;
You can do something like this:
input >> x;