Here is the question:
Change function Print so it reads from file "data.in".
Make input file a ref. parameter to function Print.
Assume Name in one line & Address on another line.
-------------------------------
This is the error I get:
:10: missing terminating > character
:19: fstream): No such file or directory
Below is what I've tried so far..
-------------------------------
#include <string>
#include <iostream>
#include <fstream)
using namespace std;
void Print(ifstream &jy);
// Post: Name and Address is written on the screen.
int main ()
{
ifstream fin;
fin.open("data.in");
if(fin)
Print(fin);
return 0;
}
//**************************************
void Print(ifstream &jy)
// Post: Name and Address is printed on the screen.