Append a string to each line in a file
There is no need to store all lines from the input file in memory.
For each line read from the input you can append the string and write the 
result to the output file. This would save memory for large input files.

You should also check if opening the input and output file was
successful, otherwise your program will silently do nothing if the
files could not be opened/created.

std::ifstream in_file(argv[1]);
if (!in_file) {
    std::cerr &lt;&lt; "Could not open input file\n";
    return EXIT_FAILURE;
}
std::ofstream out_file(argv[2]);
if (!out_file) {
    std::cerr &lt;&lt; "Could not create output file\n";
    return EXIT_FAILURE;
}
const char * add_string = argv[3];

std::string str;
while (std::getline(in_file, str)) {
    out_file &lt;&lt; str &lt;&lt; add_string &lt;&lt; "\n";
}