Hi Mikhun,
When dealing with non-standard data types like a 12-bit number which isn’t natively supported in C++. In MATLAB, fread with 'bit12' allows you to read data as 12-bit units directly, but in C++, you may need to read the data into a larger standard type and then extract the 12-bit values manually.Read the data into an array of a standard data type that is larger than 12 bits, such as uint16_t (16 bits) and then extract the 12-bit values from the array of 16-bit numbers.
Hope this helps.