I put an assert() statement in two places: have a look at the code.
The first one means that it couldn't open one of the input files. Check that the files named in int main() are what you think they are and data-containing files of those names exist in the directory where the code looks for them. On my compiler this would give
Assertion failed: in, file temp.cpp, line 15
If the second one was triggered then it means that the two files had unequal numbers of lines of histogram data, and so couldn't be combined in the way that (I think) you have specified. On my compiler this would give
Assertion failed: allData1.size() == allData2.size(), file temp.cpp, line 82