I am building a program using C++/CLI in Visual Studio 2008, I’ve been trying to save my default users directory setting in a txt file. So far I managed to save it so it look like this inside the txt file.
Input Directory=C:\Input
Output Directory=C:\Output
The question is, how can my program detect the word “Input Directory=” and takes only the words after it?
And is there any way to search for a specific word in text file and replace it in C++/CLI? So I can just search for “C:\Input” and replace it with “D:\Input”, for example.
After struggling for the whole day finding simple solution, I’ve decided to omit the “Input Directory = ” as suggested by @Hans Passant and do a crude workaround by reading the first line as input and second line as output folder setting, using techniques similar to this.
Thanks to all who have responded.