Hey guys... i'm new to the programming scene, i'm totally lost as to how to fix this problem.
Function:
Code:
typedef struct{
char id;
double x;
double y;
double power;
double radius;
}towers_t;
void
stage_2(towers_t stage_1){
int i=0;
while(i<MAXTOWERS){
if(i==EOF){
}
else{
towers[i].radius = 10.0*pow((towers[i].power/PMIN),.25)-10.0);
i++;
}
printf("Tower %c at (%4lf,%4lf) transmitting %.2lf W has a signal radius %4lf\n", towers.id, towers.x, towers.y, towers.power, towers.radius);
}
}
The error is on the line with the calculation.
The problems are stated as :
- syntax error
- subscripted value is neither array nor pointer
- syntax error before ')' token