I have a tab delimited text file which is filled with data from an rc file. I want to add another column to each line of the file after the first two '\n's.
This is the code I have at the moment:
Code:
fstream Glossary;
Glossary.open("file.txt");
Glossary.seekg(pos);
while(!Glossary.getline(val, 100).eof()) {
Glossary.ignore(100, '\t');
Glossary.ignore(100, '\t');
Glossary<<Offset+1<<'\t';
}
Glossary.close();
This code isn't actually adding anything to the file though. When i debug it it seems to find the right place to add the new text but it doesn't actually do it... Any ideas? If there's another, better way to do this please let me know. Thanks