Using <fstream.h> <IOSTREAM> or whatever is there a way to store a variable in a file like a .txt file or whatever and some otherstuff and go strait to that variable and read it with a pointer or something?
Printable View
Using <fstream.h> <IOSTREAM> or whatever is there a way to store a variable in a file like a .txt file or whatever and some otherstuff and go strait to that variable and read it with a pointer or something?
what are u trying to do?
He's talking about accessing a variable stored in a file through a pointer. Sorry, it's impossible (unless you're running on virtual memory, but that doesn't count.)
I guess i have to try to right a class or two form it then:eek:
Do you mean like a pointer to part of a file on the hard disk?
Like a pointer or reference or whatever to find a spot and be able to read from it.
I suppose if you saved the offset into the file where you wrote the particular piece of data you are interested in, then you could later use fseek to go to that location when you read from the file.
How do u use that effectivley? plz explain