c++ - What is the meaning of : "int i, (!!i)"? -


we have following c++ code:

int i; (!!i); 

what operation on variable i?

i've seen done prevent warnings "warning, variable unused".

after odd !!i statement, variable (technically) used in expression, warning suppressed, didn't change anything.

example:

void myfunc() {     int i;     (!!i);       // suppress warning caused block below. #if debug        // in retail / non-debug code, not used, , warning created!!     = getcountofsomething();     printf("the count of %d\n", i); #endif // debug } 

Comments

Popular posts from this blog

html - How can i make an element from a bottom stacking context stays in front of another higher stacking context? -

python - TypeError: start must be a integer -

html - href attribute breaking an element -