XOR two files together
#include &lt;cstring&gt;



seems unused.


using namespace std;



Not a good plan - just use the std:: qualifier, or import just the names you need, in the smallest reasonable scope.


inline std::vector&lt;int&gt; read_vector_from_disk(std::string file_path)
{
    std::ifstream instream(file_path, std::ios::in | std::ios::binary);
    std::vector&lt;int&gt; data((std::istreambuf_iterator&lt;char&gt;(instream)), std::istreambuf_iterator&lt;char&gt;());
    return data;
}



This is a very inefficient way to copy a file into memory - the vector will likely have to reallocate (copying its contents) several times, as the input iterators can't be used to predict the eventual size.

Two faster approaches would be


memory-map the file contents, probably using Boost::interprocess
work in a streaming fashion with character-by-character input (e.g. using std::transform())


Also, there's no check whether any of this reading succeeded at all.  That's bad.


std::vector&lt;int&gt; xored_file;



Again, we have a vector we'll append to without first reserving capacity.  That's reducing your efficiency.  I don't see why we need to store a copy of output, instead of immediately writing it to the output stream.

When we've finished writing, we should close the file and confirm that it was successfully written:

new_file.close();
if (!new_file) {
    std::cerr &lt;&lt; "Failed to write output file\n";
    return EXIT_FAILURE;
}