Jun 1, 2014 at 8:02pm UTC
Hi,
how can i read data from a file ?
Thanks
Jun 1, 2014 at 8:18pm UTC
http://www.cplusplus.com/doc/tutorial/files/
Here there's a good explanation of the basics
Jun 1, 2014 at 11:47pm UTC
how can i read 2 data , seperately, in the same line
Jun 2, 2014 at 1:36am UTC
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?
Jun 2, 2014 at 1:51am UTC
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 Jun 8, 2014 at 5:30pm UTC
Jun 2, 2014 at 3:20am UTC
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.