read from file

Hi,
how can i read data from a file ?
Thanks
closed account (jvqpDjzh)
http://www.cplusplus.com/doc/tutorial/files/
Here there's a good explanation of the basics
how can i read 2 data , seperately, in the same line
It depends.

Usually you'll use getline to get a whole line from the file, and break it up by manipulating the string.

Do you have an example of what your file would look like?
my file contain 5O coordinates, and i should use the friend Function Declarations...
It works with the getline but i don't know how can I convert it with the friend function
Last edited on
What do you mean friend function declarations?

Also I'm confused the code works fine for me in displaying all of the numbers from the txt file.

Please clarify on what the issue is so we can try to help you out.
Topic archived. No new replies allowed.