I should store some info in a vector of struct that comes in a little at a time. I know in advance the size of the array. My question is: should I initialize the array with structs that for me represent an invalid input? for example should I do the following:
typedef struct mystruct{
int ID;
int xvalue;
} my_struct;
#define NO_INPUT (my_struct) { ID=-1, xvalue=0}
where ID=-1 is an input that doesn't make sense for me. After the definition should I initialize the array to NO_INPUT? What is the best practice? PS Is the #define directive right? Is it compatible with C89 standards? Thanks in advance!