How do I read a binary file into a bitset
or vector
? The binary file will vary in length. Is there a better container for this? I am ne
If the file is large, Why should you read once, whole the file into the memory?
You can read a little piece every time. The size is determined with the size in this func:
file.read(buff, size)
When the buff is char's array.
I'm sorry, but You can't simplest read/save vector to file. for more details see here and here.
And use Google, It's very helpful...