I assume that you wanted to say: Every time I call record::info the contents of the file save.txt is overwritten.
That is because you opened it without specifying a second argument in the open call. In this case the previous contents of the file is erased and overwritten. If you use
std::ofstream::app
as second argument, the new data will be appended at the end of the file.
Example:
ofstream myfile;
myfile.open("save.txt", std::ofstream::app);