As I understand it no newlines shall be kept. Read line by line:
#include <string>
#include <iostream>
#include <fstream>
std::string s,totalString;
while (std::getline(file, s))
{
if(s.empty())
totalString+="added string";
else
totalString+=s;
}