<legend id='HHmf6'><style id='HHmf6'><dir id='HHmf6'><q id='HHmf6'></q></dir></style></legend>
        • <bdo id='HHmf6'></bdo><ul id='HHmf6'></ul>

        <tfoot id='HHmf6'></tfoot>
        <i id='HHmf6'><tr id='HHmf6'><dt id='HHmf6'><q id='HHmf6'><span id='HHmf6'><b id='HHmf6'><form id='HHmf6'><ins id='HHmf6'></ins><ul id='HHmf6'></ul><sub id='HHmf6'></sub></form><legend id='HHmf6'></legend><bdo id='HHmf6'><pre id='HHmf6'><center id='HHmf6'></center></pre></bdo></b><th id='HHmf6'></th></span></q></dt></tr></i><div id='HHmf6'><tfoot id='HHmf6'></tfoot><dl id='HHmf6'><fieldset id='HHmf6'></fieldset></dl></div>
      1. <small id='HHmf6'></small><noframes id='HHmf6'>

        为什么 :: (scope) 与空的左侧操作数一起使用?

        时间:2023-10-17
      2. <i id='lqWTs'><tr id='lqWTs'><dt id='lqWTs'><q id='lqWTs'><span id='lqWTs'><b id='lqWTs'><form id='lqWTs'><ins id='lqWTs'></ins><ul id='lqWTs'></ul><sub id='lqWTs'></sub></form><legend id='lqWTs'></legend><bdo id='lqWTs'><pre id='lqWTs'><center id='lqWTs'></center></pre></bdo></b><th id='lqWTs'></th></span></q></dt></tr></i><div id='lqWTs'><tfoot id='lqWTs'></tfoot><dl id='lqWTs'><fieldset id='lqWTs'></fieldset></dl></div>

          <tfoot id='lqWTs'></tfoot>
                <tbody id='lqWTs'></tbody>

              <small id='lqWTs'></small><noframes id='lqWTs'>

              • <legend id='lqWTs'><style id='lqWTs'><dir id='lqWTs'><q id='lqWTs'></q></dir></style></legend>
                • <bdo id='lqWTs'></bdo><ul id='lqWTs'></ul>
                  本文介绍了为什么 :: (scope) 与空的左侧操作数一起使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我已经看过几次了,我一直在挠头想知道为什么...

                  I've seen this a few times now, and I've been scratching my head wondering why...

                  例如:(http://www.codeguru.com/forum/showthread.php?t=377394)

                  As an example: (http://www.codeguru.com/forum/showthread.php?t=377394)

                  void LeftClick ( )
                  {  
                    INPUT    Input={0};
                    // left down 
                    Input.type      = INPUT_MOUSE;
                    Input.mi.dwFlags  = MOUSEEVENTF_LEFTDOWN;
                    ::SendInput(1,&Input,sizeof(INPUT));
                  
                    // left up
                    ::ZeroMemory(&Input,sizeof(INPUT));
                    Input.type      = INPUT_MOUSE;
                    Input.mi.dwFlags  = MOUSEEVENTF_LEFTUP;
                    ::SendInput(1,&Input,sizeof(INPUT));
                  }
                  

                  这个例子在没有 ::(范围)运算符的情况下工作,为什么它们甚至在那里?

                  This example works without the :: (scope) operators so why are they even there?

                  推荐答案

                  这基本上意味着获取 GLOBAL 作用域函数,而不是当前可见的函数".

                  This basically mean "get the GLOBAL scoped function, instead of the currently visible one".

                  void SendInput() { /* (1) */
                  }
                  
                  namespace derp {
                      void SendInput() { /* (2) */
                      }
                  
                      void LeftClick() {
                          ...
                          ::SendInput(); /* matches (1) */
                          SendInput();  /* matches (2) */
                      }
                  }
                  

                  这篇关于为什么 :: (scope) 与空的左侧操作数一起使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:在 C++ 中初始化之前声明一个对象 下一篇:C++ 多个同名类

                  相关文章

                    <bdo id='Aa0Bv'></bdo><ul id='Aa0Bv'></ul>
                    <i id='Aa0Bv'><tr id='Aa0Bv'><dt id='Aa0Bv'><q id='Aa0Bv'><span id='Aa0Bv'><b id='Aa0Bv'><form id='Aa0Bv'><ins id='Aa0Bv'></ins><ul id='Aa0Bv'></ul><sub id='Aa0Bv'></sub></form><legend id='Aa0Bv'></legend><bdo id='Aa0Bv'><pre id='Aa0Bv'><center id='Aa0Bv'></center></pre></bdo></b><th id='Aa0Bv'></th></span></q></dt></tr></i><div id='Aa0Bv'><tfoot id='Aa0Bv'></tfoot><dl id='Aa0Bv'><fieldset id='Aa0Bv'></fieldset></dl></div>
                    <legend id='Aa0Bv'><style id='Aa0Bv'><dir id='Aa0Bv'><q id='Aa0Bv'></q></dir></style></legend>
                  1. <small id='Aa0Bv'></small><noframes id='Aa0Bv'>

                    <tfoot id='Aa0Bv'></tfoot>