本文介绍了_int64未命名类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的 pch 文件中,我有以下定义:
In my pch file I have the following definitions:
#if (_MSC_VER < 1300)
typedef signed char int8_t;
typedef signed short int16_t;
typedef signed int int32_t;
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
#else
typedef signed __int8 int8_t;
typedef signed __int16 int16_t;
typedef signed __int32 int32_t;
typedef unsigned __int8 uint8_t;
typedef unsigned __int16 uint16_t;
typedef unsigned __int32 uint32_t;
#endif
typedef signed __int64 int64_t;
typedef unsigned __int64 uint64_t;
当我构建我的应用程序时,我收到错误
When I build my application I get an error at
typedef signed __int64 int64_t;
typedef unsigned __int64 uint64_t;
表示 _int64未命名类型。可能是什么问题?
which says that _int64 does not name a type. What might be the problem?
推荐答案
添加此包含
#include <inttypes.h>
然后使用uint64_t或int64_t。
Then use uint64_t or int64_t.
见下文
#include <inttypes.h>
#if (_MSC_VER < 1300)
typedef signed char int8_t;
typedef signed short int16_t;
typedef signed int int32_t;
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
#else
typedef signed __int8 int8_t;
typedef signed __int16 int16_t;
typedef signed __int32 int32_t;
typedef unsigned __int8 uint8_t;
typedef unsigned __int16 uint16_t;
typedef unsigned __int32 uint32_t;
#endif
typedef signed __int64 int64_t;
typedef unsigned __int64 uint64_t;
这篇关于_int64未命名类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!