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?

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.