?
=?ISO-8859-1?Q?=22Jos=E9_Manuel_=28JMN_CandyBeat=2
Hello.
I'm moving from Visual C++ 6.0 to Visual C++ .NET 2003 and I saw the
changes to the streams. I'm rewriting my code and finished doing it
yesterday.
All seemed to be right, but the file reading.
My old code has lines like the following function call:
(file is a ifstream, var is a WORD, that is a typedef unsigned sort)
here is the line:
file.read(&var, 2)
Well, when this line is executed, the results are not what I'm looking
for: it reads inconsistent (arbitrary?) data. In my old code this line
worked. It is supposed to read 2 bytes from the file and asign them to
the WORD in var.
For this reason, I think that Visual C++ 6.0 and .NET 2003 has some
slight differences for reading in the way I want to read.
Maybe I'm not properly using the function. I mean... maybe I don't
understand well the mechanism in C++ to read BYTES, WORDS, DWORDS
UWORDS, etc.
So I request your help and would be thankful is someboy teach me about
reading using standar C++ streams in this .NET 2003.
Thank you very much.
I'm moving from Visual C++ 6.0 to Visual C++ .NET 2003 and I saw the
changes to the streams. I'm rewriting my code and finished doing it
yesterday.
All seemed to be right, but the file reading.
My old code has lines like the following function call:
(file is a ifstream, var is a WORD, that is a typedef unsigned sort)
here is the line:
file.read(&var, 2)
Well, when this line is executed, the results are not what I'm looking
for: it reads inconsistent (arbitrary?) data. In my old code this line
worked. It is supposed to read 2 bytes from the file and asign them to
the WORD in var.
For this reason, I think that Visual C++ 6.0 and .NET 2003 has some
slight differences for reading in the way I want to read.
Maybe I'm not properly using the function. I mean... maybe I don't
understand well the mechanism in C++ to read BYTES, WORDS, DWORDS
UWORDS, etc.
So I request your help and would be thankful is someboy teach me about
reading using standar C++ streams in this .NET 2003.
Thank you very much.