Hi there everyone.
I was hoping you guys could help me out again.
I would like to write a setting to a certain line in a textdocument, for example "4000" at line 5 of the document.
So far i have this:
void MainSettings::setSettingsToFile(String *numChannels, String *savePath, String *playlistPath)
// Here the settings will be written to the settings file
{
// Declare variables
strMixChannels = numChannels;
strSettingsSavePath = ".\Settings.ini;
strPlaylistPath = playlistPath;
strSavePath = savePath;
pStream = new FileStream(strSettingsSavePath, FileMode::Create);
pWriter = new StreamWriter(pStream);
// Write the number of mixchannels to the settings file
pWriter->WriteLine(strMixChannels);
pWriter->WriteLine(strSavePath);
pWriter->WriteLine(strPlaylistPath);
pWriter->Flush();
pWriter->Close();
pStream->Close();
}
But as you can see all atttributes now are being set in one method, and i can say what goes at what line.
I want to make different methods for each attribute, however i will need to know how to give it a specific location in the document for that.
So please, if you know how to do this, all help is appreciated.