Calling a function: syntax error before ']' token
Hey guys, I've got a problem that I'm hoping someone can shed some light on...
Here's the code:
Code:
//prototype//
void load_array_from_file(FILE* fp, int quote[], char roomletter[],
int length[], int width[], char paint[], char ceiling[],
double cost[], double setup_cost[],
int* plines_in_file);
//main//
main(){
int* poption;
FILE* fp;
int quote, length, width;
int* plines_in_file;
char roomletter, paint, ceiling;
double cost, setup_cost;
load_array_from_file(*fp, quote[], roomletter[], length[], width[], paint[], ceiling[], cost[], setup_cost[], *plines_in_file);
}
//function//
void load_array_from_file(FILE* fp, int quote[], char roomletter[],
int length[], int width[], char paint[], char ceiling[],
double cost[], double setup_cost[],
int* plines_in_file){
fp = fopen("C:/Users/ASDF/Desktop/A/quotes.txt","r");
if(fp == NULL){
printf("Error\n");
}
else{
fscanf(fp, "%d,%[^:],%d,%d,%[^:],%[^:],%lf,%lf", quote, roomletter, length, width, paint, ceiling, cost, setup_cost);
printf("%d,%[^:],%d,%d,%[^:],%[^:],%lf,%lf",quote, roomletter, length, width, paint, ceiling, cost, setup_cost);
}
}
So there error code I get is:
In function 'main':
syntax error before ']' token
That is on line 33, which is this line:
load_array_from_file(*fp, quote[], roomletter[], length[], width[], paint[], ceiling[], cost[], setup_cost[], *plines_in_file);
Any idea what I'm doing wrong? Basically I'm trying to read certain values from a file and output it, but I'm stuck here.
Thanks in advance