Read binary file by blocks
using namespace std

Since none of the standard library features you use are prefixed by std::, I will assume that you have using namespace std; somewhere. Actually, you should avoid using namespace std; and fully qualify the standard library functions and classes with std:: instead. Your code won't be much longer, and you may avoid potential problems such as name clashes.

Use std::array

One thing that can be noticed is that you know that you will return a collection of exactly three std::vector&lt;char&gt;. You know the size at compile time, therefore you don't need a dynamic container, a fixed-sized one is enough. Let's make that explicit and have your function return an std::array&lt;std::vector&lt;char&gt;, 3&gt; instead.

Check for potential errors

ifstream is (fileName, ifstream::binary); is great. It's how it should be used. However, it may fail, for example if the file fileName does not exist. You should check whether such an error occured before resuming the function:

std::ifstream is (fileName, std::ifstream::binary);
if (not is)
{
    // handle errors (e.g. throw an exception)
}


Note that operator! (here not) is used to check for errors. If it yields false, it means that an error occured when opening the std::ifstream.

Accessing a std::vector underlying array

You used the C++98 way &amp;vec[0] to get the underlying array of an std::vector. Actually, when reading code, knowing what it does can be pretty hard, and that's partly due to the order of evaluation of the operators that may not be obvious for everyone. You can use vec.data() instead. This method was not available for std::vector before C++11, and that's probably why you found the solution &amp;vec[0].