Basically all this does is read in the data and then writes the entire dataset over to the Master file. However, what I really need is to be able to match on the first column which is an "INT" and where those rows match be able to augment the Dataset 1 with Dataset 2 data and deposit all that data into a file named Master.
I wondered if it would ever back sense to create and if_copy() function. For example, if column 1 of Dataset 1 and column 1 of Dataset 2 match to push_back() the column data of Dataset 2 to Dataset 1 and saving it in the Master file.
So what does the code you provided even have to do with this problem? If you want to find matching information then you're going to need to parse the file, not just copy the contents from one place to another. Since you're really only interested in the first element it should be fairly easy to accomplish your objectives. It'll be even easier if both files happen to be sorted on this "key" to begin with. I'd recommend reading one line at a time into a std::string then process the string with a stringstream to get your keys. If the keys match write the complete lines to the "Master" file.