How can I read a file in form of bytes, not using a vector.
By using this, I can read the entire file into a vector of Bytes.
std::basic_ifstream<BYTE> file(driveName, std::ios::binary);
vector<BYTE> x = std::vector<BYTE>(
(std::istreambuf_iterator<BYTE>(file)),
std::istreambuf_iterator<BYTE>() );
But, I want to read 512 bytes first, then 'x' bytes, 'x1' bytes etc., The resize option doesnt work here.
I saw this link, reading the binary file into the vector of unsigned chars, which created more confusion.
Any help on this would be appreciated.