What is &= and |=

前端 未结 7 1043
独厮守ぢ
独厮守ぢ 2021-01-18 07:31

I was going through some VC++ code in a large code-base and came across this:

    if (nState & TOOL_TIPS_VISIBLE)
        nState &= ~TOOL_TIPS_VISI         


        
相关标签:
7条回答
  • 2021-01-18 08:04
    x &= y;
    

    is equivalent to:

    x = x & y;
    

    In the same way,

    x|= y;
    

    is equivalent to:

    x = x | y;
    
    0 讨论(0)
提交回复
热议问题