[Techtalk] getline bug or doing it all wrong g++

Tintin J Marapao cjereme at ucla.edu
Tue Mar 2 00:53:47 EST 2004


I was wondering if anyone knows of a getline bug in gcc 3.31 ...  or 
perhaps I am not using the getline correctly?

It seems that when I call something  like

char line[];
char test[0]= "hello world";

...


ifstream in;
cout << test[0] << endl; //correct result - prints hello world
in.getline( line, delimiters);
cout << test[0] << endl; // prints the value of line!!



Thanks - (Hope not off topic ...!)

Christine


More information about the Techtalk mailing list