fstream::read(..);
From: dumboo (vthe2_at_yahoo.com)
Date: 05/18/04
- Next message: David White: "Re: Abstract Class"
- Previous message: Sergei: "Re: linking C with C++"
- Next in thread: John Harrison: "Re: fstream::read(..);"
- Reply: John Harrison: "Re: fstream::read(..);"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 18 May 2004 12:23:33 +0530
hi there
i m using fstream object for reading through and writing to my file, using
following code
char c;
while(!m_aa.eof())
{
m_aa.read(&c, sizeof(c));
m_oo.write(&c, sizeof(c));
cout<<"\nout to c:"<<(int)c;
}
when i saw the outoput of 'cout' and checked the output in HEX editor,
it always showed me 0xCC (-52) in first byte(which is not present in input
file), i dont know why is it occouring, i had open the files properly in
binary mode, and m not doing any kind of preprocessing, except the above
operation,
I m using MSVC 6.0 any suggestion ?
- Next message: David White: "Re: Abstract Class"
- Previous message: Sergei: "Re: linking C with C++"
- Next in thread: John Harrison: "Re: fstream::read(..);"
- Reply: John Harrison: "Re: fstream::read(..);"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|