Thanks for the tips guys, I wrote some new codes just now and got the program to compile. But there seems to be something wrong with the koolplot function I wrote.
The following error popped up, Any ideas what's going on?
Here's the source code
graph.c:24 error: cannot convert 'double' to 'double' for argument '1' 'void graph(double*, int)'
the text file I'm using:
#define A 100
void graph(double num, int z);
int col, z=0, n=0;
double col2[A], half[A];
data = fopen("textfile.txt", "r");
while (fscanf(data, "%lf %lf", &col, &col2[z]) == 2)
half[n] = col2[z]/2;
printf("\n%d %lf\n", col, half[n]);
/* Is there something wrong with the function? */
void graph(double num, int z)
Plotdata x(0, 20);
Plotdata y(num, z);