// dump to disk the contents of the virtualasciifile, appending at the end of the given file_name
intresult=0;
intresult=0;
fstreamoutput_file;
fstreamoutput_file;
output_file.open(file_name,ios::app);
output_file.open(file_name,ios::app);
...
@@ -283,6 +289,7 @@ int VirtualAsciiFile::insert(int32_t position, VirtualAsciiFile& rhs, int32_t st
...
@@ -283,6 +289,7 @@ int VirtualAsciiFile::insert(int32_t position, VirtualAsciiFile& rhs, int32_t st
int32_tfinal_index=position+end-start;
int32_tfinal_index=position+end-start;
if(final_index<=number_of_lines()){
if(final_index<=number_of_lines()){
for(int32_tli=start;li<end;li++){
for(int32_tli=start;li<end;li++){
// since here we are replacing the previous placeholder empty strings, make sure they are properly released when they are replaced (i.e. try it with a simple hello world example and pass it through valgrind)