as***********@gmail.com wrote:
what does this means????/
switch(g_messagePrimitives[g_messageCount].msgType)
Look up switch-case expressions. They are quite simple to implement.
Presumably, msgType is an attribute of the elements in the
g_messagePrimitives container (probably a primitive array of messages).
the switch compares the msgType of the specified element with the
available cases available, case-default otherwise.
example:
const int N = 1;
switch( N )
{
case 0:
// do this
break;
case 1:
// do that - this case should be run until break since N == 1
break;
case default:
// do the default action
}
For the record, the switch parameter is a constant and the parameter
should reflect that for readability.
So to answer your question, your switch is running the appropriate case
sequence depending on the message type involved.