M
Marc Ouellette
Hi Everyone,
I am currently reading Binary files in C++Builder using the code below.
Removed some error chacking to make the code simpler to read.
std::ifstream fin;
fin.open(filename.c_str(), std::ios::in|std::ios::binary);
// read the image from file into memory
fin.read((char *)ptr, sizeof(T) * numCells);
fin.close();
I am new to C# and would like to read the same file. In the case above T is
an short.
What would be the quickest way to read it if I already know how many shorts
to read(numCells) and what is the C++ short to C# equivalent(int)?
Thanks,
Marc
I am currently reading Binary files in C++Builder using the code below.
Removed some error chacking to make the code simpler to read.
std::ifstream fin;
fin.open(filename.c_str(), std::ios::in|std::ios::binary);
// read the image from file into memory
fin.read((char *)ptr, sizeof(T) * numCells);
fin.close();
I am new to C# and would like to read the same file. In the case above T is
an short.
What would be the quickest way to read it if I already know how many shorts
to read(numCells) and what is the C++ short to C# equivalent(int)?
Thanks,
Marc