Originally Posted by
montablac
how do i wright to files and be able to store mutuple varables
Originally Posted by
montablac
,like in a .ini file or such
So you want to write to an ini-file but it could be a different format as well.
Originally Posted by
montablac
i looked at that,but it dosent tell me how to store mutuple varables
it only tells me that itll go into a string of leters numbers and chartars
Now I understand you know how to write one value to a file but you don't know how to do it multiple times.
Originally Posted by
montablac
@ Zuk:
have you ever opened a .ini file,kinda like that
Now I know that you actually don't want to write a file.
It's reading an .ini file what you really want.
And yes I have done that before. It's very straightforward.
Code:
read a line from the file
if the first non whirspace character is a '[' its a section. cut the '[' and the ']' and you have the name of the section.
else if the line contains a '=' the part before the '=' is a variable name the part after the '=' is the value.
now you just have to check if the value-part is a number or a string
continue until eof is reached.
show some code that we can help with actual problems and don't let us guess about your intentions.
Kurt