the function getline is a public member of istream and cin.getline can be used.
Since ifstream is publicily derived from istream, getline shall be available in ifstream as well. However,on solaris ver 2.7, getline is not recognised.
e.g
ifstream f("a.cpp");
string s;
f.getline(s,100 );
why doesn't complier recognise fstream::getlin e(string,int) even though istream::getlin e(string,int) is recognized
Since ifstream is publicily derived from istream, getline shall be available in ifstream as well. However,on solaris ver 2.7, getline is not recognised.
e.g
ifstream f("a.cpp");
string s;
f.getline(s,100 );
why doesn't complier recognise fstream::getlin e(string,int) even though istream::getlin e(string,int) is recognized
Comment