I have assigned values to a fields in a structure. This resulted in multiple errors.
typedef struct t_queue {
int head = 0;
int tail = 0;
int maxSize = 0;
int size = 0;
SOCKET* queue = NULL;
}Queue;
typedef struct t_threadData {
int topicID;
bool isEngineActive = FALSE;
bool isServerActive = TRUE;
int numberOfConnectedSubs = 0;
Queue* queue;
HANDLE PublisherReady;
HANDLE ThreadReady;
HANDLE BarrierOK;
CRITICAL_SECTION Critical_Section;
int NumberOfThreadsWaiting = 0;
SOCKET sockets[NUMBER_OF_SUBSCRIBERS];
}ThreadData;
Errors are:
E0065 expected a ';'
E0020 identifier "bool" is undefined
I'm working in C on Windows 10 using Visual Studio Enterprise 2017.
Thank you for your help in advance.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…