Hi Guys,

I'm trying to read a while with the following formate

1999 43558047
2000 59068567
2001 67098709

I'm not sure how many records are in the file.

Now I want to read this file using
struct mystruct {

double x; //this would be first column
double y;//this would be second column

and I want to the store the values in arrays, so later on I can use some sort of calculations how to i go about it?

9 Years
Discussion Span
Last Post by Ancient Dragon

1) why use double in the struct since the values in the file are only integers.

2) A linked list would be a better choice because it is easier to add new structs. Here is one of the many tutorials you can find with googler.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.