and hte function is...Code:string str; x.read(inFile); if (x.animalType()==2 || x.animalType()==3) str = std::cerr; x.print(str.c_str()) << endl;
Code:ostream& animals::print(ostream& stream = cout) const {
what im trying to do is, read from a file, and if its a dog or a cat, then it'll print out to the error stream.
and if its any other animal then it'll print out to standard output (cout)
any help why this code wont work?



LinkBack URL
About LinkBacks


