1. # pragma warning (Disable: 4507 34; once: 4385; error: 164)
Equivalent
// Disable warning messages 4507 and 4034.
# Pragma warning (Disable: 4507 34)
// Issue warning 4385 only once.
# Pragma warning (once: 4385)
// Report warning 4164 as an error.
# Pragma warning (error: 164)
2. the compiler automatically adds 999 to the warning number between 0 and 4000.
3. A compiland Statement supports up to 56 # pragma warning statements.
4. use the # pragma warning statement in the function body. If the warning number is greater than 4699, this statement takes effect after the function ends. that is to say, the # pragma warning statement in the function body is the same as placing it after the function is completed. for example:
1. # pragma warning (Disable: 4700)
2. Void test ()
3 .{
4. Int X;
5. Int y = x; // No c4700 here
6. # pragma warning (default: 4700) // c4700 enabled after test ends
7 .}
8.
9. Int main ()
10 .{
11. Int X;
12. Int y = x; // c4700
13 .}
The row 6th is placed in any row of the test () function, which is the same effect as before the main () function after the braces in the second half of the test () function: Only for main () int y = x; in the function.