I happened to come across a macro definition as shown below in a c++ code(https://github.com/LairdCP/UwTerminalX).
#define SpeedModeInactive 0b00
#define SpeedModeRecv 0b01
#define SpeedModeSend 0b10
#define SpeedModeSendRecv 0b11
When I tried to compile it using visual studio 2010, it giving me the following error.
Error 14 error C2059: syntax error : ')'
What is the meaning of this macro? The usage of macro is shown below.
if ((gchSpeedTestMode == SpeedModeSendRecv || gchSpeedTestMode == SpeedModeRecv) && (gintSpeedBytesReceived10s > 0 || ui->edit_SpeedBytesRec10s->text().toInt() > 0))
{
//Data has been received in the past 10 seconds: start a timer before stopping to catch the extra data packets
gchSpeedTestMode = SpeedModeRecv;
gtmrSpeedTestDelayTimer = new QTimer();
gtmrSpeedTestDelayTimer->setSingleShot(true);
connect(gtmrSpeedTestDelayTimer, SIGNAL(timeout()), this, SLOT(SpeedTestStopTimer()));
gtmrSpeedTestDelayTimer->start(5000);
//Show message that test will end soon
ui->statusBar->showMessage("Waiting 5 seconds for packets to be received... Click cancel again to stop instantly.");
}