[Techtalk] Re: getline bug or doing it all wrong g++
Tintin J Marapao
cjereme at ucla.edu
Tue Mar 2 02:06:50 EST 2004
Hi!
<snip>
I actually didn't declare it that way; Sorry about the sloppiness. I
actually had an array of char*s and meant to say the first value (index
of 0) in the char *test[];
I guess it should go :
char *test = "hello world";
ifstream in;
(!in.eof())
...
cout << test << endl; //correct result - prints hello world
in.getline( line, delimiters);
cout << test << endl; // prints the value of line!!
Anyway, I'm trying to use fgets{} and see if that helps any... (in C )
Thanks anyway!
Christine
More information about the Techtalk
mailing list