I'm very new to working with binary, so I don't know how to work with such files correcty.
I recieved a .dat file. I know it's a depth map - "The depth map is an array of double written to a binary file, 64 bits in size for each number. The array is written line by line, the dimensions of the array are Width * Height, Height of lines by the Width of elements. The file contains: Height, Width, data array."
I don't know how to read double characters and make an array. I have this code:
ifstream ifs(L"D:\\kek\\DepthMap_10.dat", std::ios::binary);
char buff[1000];
ifs.seekg(0, std::ios::beg);
int count = 0;
while (!ifs.eof()) {
ifs.read(buff, 1000);
cout << count++ << buff<< endl;
}
And as output I have something like this
914 fф╦┼p@)щ▓p╧┬p@уЖФНВ┐p@уTхk↔╝p@юS@∟x╕p@УбХоЗ┤p@☺пC7b░p@лБy>%мp@y‼i∟сзp@╚_-
What should I do to convert this into double and receive an array?
P.S. You can download file here (google disk).