I am writing a large program (by my standards but certainly not by most) for school. Anyway, in both of my classes (that is the abstract data type, not school) I am manipulating files. Is there anyway that I can use a variable to connect the filestream to the directory file. I have tried using a string variable in declarations similar to the following:
ifstream inFstream;
inFstream.open(filename) //filename is a string
I get compile errors because it wants a constant value. Is there a workaround. I am hoping it is like dynamic arrays and there is a pretty simple answer.
Also, still on the topic of files. How can I goto a specific part of a file and manipulate it? The end of a file?
I learn best from examples but I'm definatatly a newbie at c++ so if you could tone down examples to something human it would be appreciated.
Thanks for any help you can provide:
retretret