gathering x,y data from txt file

I have a txt file like this
book3.txt

I have values of the x-axis in the first row. and values of y-axis in the first column. the file contains x, y data ranging from 0 to 100. I want to arrange them as
x, y, data

using C++

could not get any idea!!! any help???

closed account (jwkNwA7f)
This might help: http://www.cplusplus.com/doc/tutorial/files/
Well think of it this way, all your .txt file is, is just a big fat string located somewhere in your Harddrive. What is a string? A string can be thought of as just a sequence of characters, and if you don't know what a character is then you've got some reading to do my friend.

Now to give you a leg in. You can't just reference a file through a memory address because memory addresses will almost always refer to an address within a program that has some allocated RAM(Random Access Memory). So what do you do? Well the it's the Operating systems job to help you with talking to your harddrive/ querying some data/ etc.

Since I see some one already posted a good resource I'd advise you to look at it.
Last edited on
Topic archived. No new replies allowed.