Array of struct as a global variable
Hello,
i’m a starter in AC6.
In the past i worked in my free time coocox and other IDE.
I have a lot of problems with the syntax in AC6.
My new problem is the defination from a array struc in a second file.
.h (file a and file b)
*************************************
typedef struct sensor
{
double Value;
int LastRefresh;
};
****************************************
****************************************
file_a.c
struct sensor Sensors(32); //() = [[]]
.
.
Sensors0.LastRefresh = 3;
********************************************
********************************************
file_b.c
extern struct sensor Sensors(); //() = [[]]
********************************************
My problem
I have no access to the value for example “Sensors(0).LastRefresh”
Sorry. I can’t write the character with the “square bracket”. i use ()!!
I set a breakpoint and the variable Sensors..... is not a array and has no values.
Can someone help me`?
Regards
Wolf41244