gpt4 book ai didi

c++ - Windows 8 Consumer Preview 中的 GetTickCount() 在哪里?

转载 作者:太空狗 更新时间:2023-10-29 23:33:44 24 4
gpt4 key购买 nike

我最近将一个非常普通的应用程序从 Windows 8 Developer Preview 移植到 Windows 8 Consumer Preview。除了现在函数 GetTickCount() 之外,一切似乎都正常似乎不再在 Windows.h 或 WinBase.h 中定义。

尽管我在文件顶部定义了这些 header :

#include <Windows.h>
#include <WinBase.h>

我的代码行

unsigned int seed = GetTickCount() % UINT_MAX; 

仍然给我错误:

error C3861: 'GetTickCount': identifier not found

谁能告诉我 GetTickCount() 去了哪里或者我应该用什么来代替?

最佳答案

来自GetTickCount docs :

Applies to: desktop apps only

来自GetTickCount64 docs :

Applies to: desktop apps | Metro style apps

因此,使用 GetTickCount64

关于c++ - Windows 8 Consumer Preview 中的 GetTickCount() 在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10442191/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com