This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
continuing woes with iostream
- To: libstdc++ <libstdc++@sourceware.cygnus.com>
- Subject: continuing woes with iostream
- From: dek@cgl.ucsf.edu
- Date: Thu, 05 Aug 1999 10:52:15 -0700
- Reply-to: dek@cgl.ucsf.edu
Hi, I reported having trouble with the following program, which
has been fixed (mostly). It does indeed copy input to output correctly
now, although there are leading "^@" symbols before the actual file data is read.
Is the index into the internal array pointing to the wrong space?
#include <iostream>
int main()
{
char c;
while(std::cin.get(c)) {
std::cout << "Got: '";
std::cout.put(c);
std::cout << "'" << std::endl; }
return 0;
}
Output:
Got: '^@'
... many such lines ...
Got: '#'
Got: 'i'
Got: 'n'
Got: 'c'
Got: 'l'
Got: 'u'
Got: 'd'
Got: 'e'
... etc ...
Dave
-----------------------------------------------------------------------------
Email: dek@cgl.ucsf.edu David Konerding WWW: http://picasso.ucsf.edu/~dek
-----------------------------------------------------------------------------