本文介绍了C99 stdint.h的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 这里是Dinkumware图书馆参考的摘录: __________ | uint8_t,uint16_t,uint32_t,uint64_t | |每种类型都指定一个无符号整数类型 |其代表正好是8,16,32, |或者64位。 __________ 如果我们有一个36位系统如下,怎么可能呢? 字符:9位 短:18位 int:36位 长:36-位 - Frederick Gotham 解决方案 嗯,显然不可能。即使它可以,重要吗? - Richard Heathfield Usenet是一个奇怪的地方 - dmr 29/7/1999 http://www.cpax.org.uk 电子邮件:rjh在上面的域名(但显然放弃了www) 嗯,它显然不可能。即使可能,重要吗? 我会理解如果它是: 如果可能,类型为uint8_t,uint16_t,uint32_t,uint64_t 表示无符号整数类型,其表示形式正好... 但它并没有说在可能的情况下。 - 它明确表示这些类型 可用...? - Frederick Gotham [...] IIRC,条款说明那些typedef存在_if_系统上有适合类型的。在9位字节的情况下,它们只是 不会在那里。 你会得到的是int_least8_t等,但我认为。 Uli Here''s an excerpt from the Dinkumware library reference:__________| uint8_t, uint16_t, uint32_t, uint64_t|| The types each specify an unsigned integer type| whose representation has exactly eight, 16, 32,| or 64 bits, respectively.__________How could that be possible if we had a 36-Bit system such as the following?char: 9-Bitshort: 18-Bitint: 36-Bitlong: 36-Bit--Frederick Gotham 解决方案Well, it couldn''t, obviously. And even if it could, would it matter?--Richard Heathfield"Usenet is a strange place" - dmr 29/7/1999 http://www.cpax.org.ukemail: rjh at above domain (but drop the www, obviously)Well, it couldn''t, obviously. And even if it could, would it matter?I would understand if it read:Where possible, the types "uint8_t, uint16_t, uint32_t, uint64_t"denote an unsigned integer type whose representation has exactly...But it doesn''t say "where possible" -- it plainly states that these typesare available... ?--Frederick Gotham[...]IIRC, the terms state that those typedefs are present _if_ there aresuitable types on the system. In the case of a 9 bit byte, they justwouldn''t be there.What you would get would be int_least8_t etc though, I think.Uli 这篇关于C99 stdint.h的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-18 12:45