g++-compiler bug? Problem with getline

Peter Schmid schmid@ltoi.iap.physik.tu-darmstadt.de
Sat Jan 31 08:39:00 GMT 1998


The following program does not compile.
It did work with the previous egcs snapshot. 

Peter Schmid

cat t.C
#include <iostream.h>
#include <string>
using namespace std;

int main ()
{
    string zeile;
    const string trenner(" \t,.;");
    while (getline(cin,zeile)) {
        string::size_type anf;
        anf = zeile.find_first_not_of(trenner);
        }
}

g++ -o t t.C -W -Wall
t.C: In function `int main()':
t.C:9: no matching function for call to `getline (_IO_istream_withassign &, bas
ic_string<char,string_char_traits<char>,__default_alloc_template<false,0> > &)'




More information about the Gcc-bugs mailing list