Hi, when I try to compile my code below I get the following errors:
error C2440: '>=' : cannot convert from 'double *' to 'double'
error C2440: '>=' : cannot convert from 'double *' to 'double'
I believe I'm dereferencing everything correctly
#define TRUE 1
#define FALSE 0;
#include <stdio.h>
typedef struct Con{
double samTime[2];
double sen[2];
int test[2];
} CON, *CON_PTR;
void GM(double **TTXY) {
int NoS;
int numOfSen = 2;
int startTime =0;
CON con;
if((con = (CON_PTR) malloc(numOfSen*sizeof(CON)))==NULL) {
printf(“Malloc failed\n”);
exit(1);
}
for (NoS=0;NoS<numOfSen;NoS++) {
con[NoS].samTime[0] = startTime;
con[NoS].samTime[1] = startTime;
con[NoS].sensor[0] = 0;
con[NoS].sensor[1] = 0;
con[NoS].test[0] = FALSE;
con[NoS].test[1] = FALSE;
}
if (con[NoS].samTime[0] >= TTXY[1]) {
con[NoS].test[0] = TRUE;
}
if (con[NoS].samTime[1] == TTXY[1]) {
con[NoS].test[1] = TRUE;
}
}