"Uint32","int16"等等;他们是标准的c ++吗? [英] "Uint32", "int16" and the like; are they standard c++?

查看:52
本文介绍了"Uint32","int16"等等;他们是标准的c ++吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对C ++还是很陌生,但是我掌握了基本知识.在阅读其他人的代码时,我遇到过"Uint32"(各种大小写)和类似数据类型的使用,但是我找不到任何提及它们的文档.我知道"Uint32"是32位的无符号整数,但是我的编译器却没有.我正在使用视觉c ++ express,但据我所知,它无法识别任何形式.

I'm quite new to c++, but I've got the hang of the fundamentals. I've come across the use of "Uint32" (in various capitalizations) and similar data types when reading other's code, but I can't find any documentation mentioning them. I understand that "Uint32" is an unsigned int with 32 bits, but my compiler doesn't. I'm using visual c++ express, and it doesn't recognize any form of it from what I can tell.

是否有一些编译器默认读取这些数据类型,或者这些程序员将它们自己声明为类或#define常量?

Is there some compilers that reads those data types by default, or have these programmers declared them themselves as classes or #define constants?

我可以看到使用它们确切地知道您的整数将有多长的意义,因为正常的声明似乎会因系统而异.还有其他利弊吗?

I can see a point in using them to know exactly how long your integer will be, since the normal declaration seems to vary depending on the system. Is there any other pros or cons using them?

推荐答案

Visual c ++不支持固定宽度的整数类型,因为它不包括对C99的支持.查看我对此主题的问题的答案,以了解使用它们的各种选择

Visual c++ doesn't support the fixed-width integer types, because it doesn't include support for C99. Check out the answers to my question on this subject for various options you have for using them.

这篇关于"Uint32","int16"等等;他们是标准的c ++吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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