H
Howard Weiss
I am reading a file (containing short integers). To read the file, I use
the following
FileStream *myFile = new FileStream(FileName, FileMode::Open,
FileAccess::Read);
__int64 myFileSize = myFile->get_Length();
Byte[] myFileData;
myFile1Data = new Byte[myFileSize];
myFile->Read(myFile1Data, 0, myFileSize);
This reads the contents of the file into memory. I would now like to access
the data as an Array of UInt16.
However, Managed C++ does not allow me to perform a simple cast, e.g.
UInt16 *myUInt16 = (UInt16 *) myFileData;
Can I do what I want? If not, why not?
Howard Weiss
the following
FileStream *myFile = new FileStream(FileName, FileMode::Open,
FileAccess::Read);
__int64 myFileSize = myFile->get_Length();
Byte[] myFileData;
myFile1Data = new Byte[myFileSize];
myFile->Read(myFile1Data, 0, myFileSize);
This reads the contents of the file into memory. I would now like to access
the data as an Array of UInt16.
However, Managed C++ does not allow me to perform a simple cast, e.g.
UInt16 *myUInt16 = (UInt16 *) myFileData;
Can I do what I want? If not, why not?
Howard Weiss