Subj : Re: getline() To : borland.public.cpp.borlandcpp From : gianlucaspm Date : Thu Aug 25 2005 01:32 am Try this: #include #include //For cin #include //For ifstream, fstream #include //For istringstream, stringstream using namespace std; class MyCustomIstream: public istream { public: MyCustomIstream():istream(){}; };//MyCustomIstream int main(int argc, char* argv[]) { string str; getline(cin, str); ifstream ifs; getline(ifs, str); fstream fs; getline(fs, str); istringstream iss; getline(iss, str); stringstream ss; getline(ss, str); MyCustomIstream myCustomIstream; getline(myCustomIstream, str); //istream is; //doesn't compile } If you uncomment the last line you won't be compile anymore because the constructor for istream is protected (check istream.h file), therefore is accessible only by his descendants ifstream, fstream, istringstream, stringstream, MyCustomIstream. hth, Gianluca "Rod Runnheim" ha scritto nel messaggio news:42f92e1e@newsgroups.borland.com... > I'm having problems getting the compiler to recognize the stl getline() > function. > > getline(istream, string) > > It is not finding the definition for it. Any suggestions? > > Rod > > .