0

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.

3
Contributors
2
Replies
4
Views
12 Years
Discussion Span
Last Post by Dogtree
0

>> (certainly not C or C++).
It looks like Managed C++. But I agree that this question would be better asked in a .NET forum.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.