The title says it all i want to make 1 file which can store information which my C++ program can read and use. How do I go about doing this.
kelechi96
0
Light Poster
Recommended Answers
Jump to PostAll a config file need be is a simple text file with the values stored in it that your program will use.
The program will open the file, read and heed the values. If the user wants to change those values through the program, then it will have to …
Jump to Postyou could simply read through the file, line by line, not doing anything with the data you don't need at the moment.
If your file is formatted with every line exactly the same length, you could perhaps use the seekg( ) method to jump around to where a given …
Jump to PostYou shouldn't really "BUMP" a post. At least pretend to ask another question!
regex is something you can look up yourself, but it is not necessary for your problem. Here's an example of parsing a simple config file:
/* File config.txt: num = 123 str = …
All 11 Replies
vmanes
1,165
Posting Virtuoso
kelechi96
0
Light Poster
vmanes
1,165
Posting Virtuoso
jen140
0
Junior Poster
kelechi96
0
Light Poster
jen140
0
Junior Poster
kelechi96
0
Light Poster
kelechi96
0
Light Poster
nucleon
114
Posting Pro in Training
kelechi96
0
Light Poster
jen140
0
Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.