• <legend id='GOQCt'><style id='GOQCt'><dir id='GOQCt'><q id='GOQCt'></q></dir></style></legend>
    <i id='GOQCt'><tr id='GOQCt'><dt id='GOQCt'><q id='GOQCt'><span id='GOQCt'><b id='GOQCt'><form id='GOQCt'><ins id='GOQCt'></ins><ul id='GOQCt'></ul><sub id='GOQCt'></sub></form><legend id='GOQCt'></legend><bdo id='GOQCt'><pre id='GOQCt'><center id='GOQCt'></center></pre></bdo></b><th id='GOQCt'></th></span></q></dt></tr></i><div id='GOQCt'><tfoot id='GOQCt'></tfoot><dl id='GOQCt'><fieldset id='GOQCt'></fieldset></dl></div>
    <tfoot id='GOQCt'></tfoot>

    1. <small id='GOQCt'></small><noframes id='GOQCt'>

        <bdo id='GOQCt'></bdo><ul id='GOQCt'></ul>

      1. 将 DWORD 显式初始化为 1,但调试器显示超出范围

        时间:2023-08-01

            <tbody id='Tbhlg'></tbody>
          • <legend id='Tbhlg'><style id='Tbhlg'><dir id='Tbhlg'><q id='Tbhlg'></q></dir></style></legend>

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

            1. <tfoot id='Tbhlg'></tfoot>

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

              • <bdo id='Tbhlg'></bdo><ul id='Tbhlg'></ul>

                  本文介绍了将 DWORD 显式初始化为 1,但调试器显示超出范围的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我对这个问题有点失望 - 在调试模式下这个问题根本没有出现,但在发布模式下,我感觉几乎无能为力.

                  I'm a bit flabberghasted with this issue - in debug mode this issue doesn't come up at all, but in release mode it feels like there's almost nothing I can do to fix it.

                  这是 VS2013 内部发生的截图:

                  Here's a screenshot of what's going on inside VS2013:

                  我将nResult初始化为1L,内部值显示为3422785012.在Debug模式下,这个值确实是1L.

                  I initialize nResult to 1L, and the internal value is shown as 3422785012. In Debug mode, this value is indeed 1L.

                  关于为什么显示的值甚至不接近我为 nResult 设置的初始值的任何想法?我试过使用编译器设置 - 在调试模式下,此代码运行良好.

                  Any ideas as to why the displayed value isn't even close to the initial value I set for nResult? I've tried playing with compiler settings - in Debug mode this code runs fine.

                  推荐答案

                  您的代码很可能优化.这意味着编译器以一种您的源代码与编译器生成的内容不匹配的方式移动和删除了代码.

                  Your code is more than likely optimized. This means that the compiler has moved and eliminated code in a way that your source code does not match what the compiler has produced.

                  要么调试未优化的代码,要么在充分了解源代码可能与正在执行的实际指令不匹配的情况下调试优化代码.

                  Either debug unoptimized code, or debug optimized code with the full knowledge that the source may not match the actual instructions being performed.

                  如果您想调试发布版本但在调试器中看到正确的值,请转到 Visual Studio 中项目的属性,转到 C/C++ 部分,然后禁用优化.重建.

                  If you want to debug a release build but see the correct values in the debugger, go to the Properties of your project in Visual Studio, go to the C/C++ section, and disable the optimizations. Rebuild.

                  这篇关于将 DWORD 显式初始化为 1,但调试器显示超出范围的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:在 C++ Win32 中获取计算机上的用户配置文件列表 下一篇:CreateWindow/CreateDialog 中的 HWND 可以从另一个线程获

                  相关文章

                  最新文章

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

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

                  1. <tfoot id='IhM6w'></tfoot>