Emil
Thu Jun 02 16:51:33 CDT 2005
Hi Joel,
Somethin' like this?
ifstream ifs("file.bin", ios::binary);
int ch;
ifs >> noskipws;
while(!ifs.eof()) {
ifs >> ch;
cout << hex << ch;
}
cout << endl;
ifs.close();
return 0;
regards
Emil Kvarnhammar
http://www.ynax.com
"Joel Whitehouse" <joelwhitehouse@gmail.com> wrote in message
news:uCY0FQ4ZFHA.1448@TK2MSFTNGP09.phx.gbl...
> Hello All,
>
> I'm having some trouble with cin and ifstreams while reading some binary
> data. Everytime I read in character #10 (Line feed,) the stream fails,
> and I am unable to read any further from the stream, even if I use
> cin.clear() or cin.peek().
>
> What can do to be able to read past a Line Feed?
>
> -Joel