提问者:小点点

C++中<UINTPTR_T>和<INT>标记出错[已关闭]


    {
        uintptr_t localPlayer = ReadProcessMemory<uintptr_t>(moduleBase + dwEntityList);
        int iFOV = ReadProcessMemory<int>(localPlayer + m_iFOV);
        std::cout << "FOV: " << iFOV << std::endl;

        if (GetAsyncKeyState(0x76) & 1)
        {
            fov = fov - 1;
            WriteProcessMemory<int>(localPlayer + m_iFOV, fov);
        }

        if (GetAsyncKeyState(0x77) & 1)
        {
            fov = fov + 1;
            WriteProcessMemory<int>(localPlayer + m_iFOV, fov);
        }
}

在和上获取“不允许类型名称”错误;标签。提前谢谢!


共1个答案

匿名用户

通常,Win32 API是C风格的,所以忘掉那些你试图在其中潜入的花哨的模板化的东西吧。

另外,正如@MikeCat所指出的,阅读文档。这两个函数都返回bool,这与您试图强制的uintptr_t大相径庭。

相关问题


MySQL Query : SELECT * FROM v9_ask_question WHERE 1=1 AND question regexp '(c++|中|uintptr_t|int|标记|出错|关闭)' ORDER BY qid DESC LIMIT 20
MySQL Error : Got error 'repetition-operator operand invalid' from regexp
MySQL Errno : 1139
Message : Got error 'repetition-operator operand invalid' from regexp
Need Help?