Page 1 of 1

How do you read in values from a file

Posted: Mon Mar 31, 2008 11:13 pm
by Ste2008
Hi i am currently creating a Textctrl box and am looking to read in values from a file, I dont want to display everything in the file at once i.e using the function Load file
I would like to be able to read in either a line or single values if possible and store them in a variable which i can then use to display in the text box as i need to
Thanx in advance

Posted: Tue Apr 01, 2008 1:13 am
by ArKay
Depends. If the file isn't too big maybe wxTextFile could be of use. ... wxtextfile

Posted: Tue Apr 01, 2008 6:09 am
by lester

Posted: Tue Apr 01, 2008 9:49 am
by DavidHart

wxFFile leaves you doing all the work. wxTextFile would be fine for adding lines, but doesn't help with shorter strings or other values.

Your best choice would be wxTextInputStream, which knows about all these things. ... tream.html