Basic knowledge: today, when I was debugging messages sent and received by the server ZJ, I had a bug. I chose to call the log and finally checked out the two small errors...
Basic post-work knowledge forgotten ~~~~ Note down.
1. switch_case statement. To execute the same sentence in multiple cases, write the following statement:
Case:
Case B:
Case C:
Do_something ();
Break;
Cannot be written:
Case:
B:
C:
Do_something ():
Break;
Even if you write an error, the compiler cannot help you check this error (My vs2005 ).
2. for applications of static variables, values are assigned only for the first time and will not be assigned in the future. OnProgramIs written
Static uint32 msgtype = PMSG-> uitype;
Switch (msgtype)
{
...............
}
As a result, the same message is always received ....
In the future, we will use local variables in the function...