什么是 u_int32_t? [英] What is u_int32_t?

查看:85
本文介绍了什么是 u_int32_t?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能的重复:
C 中使用的数据类型

嗨我正在从 Linux 移植到 Visual C++.我发现了很多错误.什么是 u_int32_t ?我在 Visual C++ 中找不到它?它仅在 Linux 中可用吗?我应该在 Visual C++ 中使用哪种类型?提前致谢!!!

Hi I'm doing porting from Linux to Visual C ++. And I found quite a few errors. What is u_int32_t ? I can't find it in Visual C ++? Is it only available in Linux? Which type should I use in Visual C++? Thanks in advance !!!

凯文

推荐答案

C99 头文件 stdint.h 定义了不依赖于体系结构或编译器的类型.unsigned int 的含义可能不同(例如,在 16 位系统上为 16 位宽),但 stdint.h 中的那些类型具有特定的大小.

The C99 header stdint.h defines types that do not depend on architecture or compiler. The meaning of unsigned int can differ (e.g. 16bit wide on a 16bit system), but those types from stdint.h have a specific size.

额外的下划线不小心滑到了那里,或者有人为某个图书馆或其他东西重新输入了它们.如果是后者,请包含您自己的一些标头,在该标头中包含 stdint.h 并确保在包含之后 typedef uint32_t u_int32_t.

Either the additional underscore accidentally slipped in there, or someone re-typed them for some library or whatever. If the latter one is the case, include some header of your own, in that header include stdint.h and make sure to typedef uint32_t u_int32_t after the include.

这篇关于什么是 u_int32_t?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆