C++ reading 16bit binary data from raw img and store them in vector
问题 These days I am struggling at malloc memory. I try to read 16-bit binary data from raw img and store them in buffer or vector. The total size of these binary data is about 15M. For this kind of size, which way is better between buf or vector? Here is my code below: #include <imebra/imebra.h> #include <stdio.h> #include <iostream> #include <fstream> #include <string.h> #include <vector> #include<iterator> #include <algorithm> #define img_height 2816 #define img_width 2816 //#define img_size