I am reading from a file using a stream, and wish to pass the stream into a function I call, I tried this but it doesnt work, any ideas?... thx in adv
..................................
fstream File;
char x;
File.open("file.txt", ios::in);
while(!File.eof())
{
File >> x;
if(x == "a"{GetLine(File);}
}
.................................
*/declaration/*
void GetLine(fstream InFile);
.................................
*/implementation/*
void GetLine(fstream InFile)
{
char Y;
InFile >> Y;
}
..................................
fstream File;
char x;
File.open("file.txt", ios::in);
while(!File.eof())
{
File >> x;
if(x == "a"{GetLine(File);}
}
.................................
*/declaration/*
void GetLine(fstream InFile);
.................................
*/implementation/*
void GetLine(fstream InFile)
{
char Y;
InFile >> Y;
}