• <i id='e6XHJ'><tr id='e6XHJ'><dt id='e6XHJ'><q id='e6XHJ'><span id='e6XHJ'><b id='e6XHJ'><form id='e6XHJ'><ins id='e6XHJ'></ins><ul id='e6XHJ'></ul><sub id='e6XHJ'></sub></form><legend id='e6XHJ'></legend><bdo id='e6XHJ'><pre id='e6XHJ'><center id='e6XHJ'></center></pre></bdo></b><th id='e6XHJ'></th></span></q></dt></tr></i><div id='e6XHJ'><tfoot id='e6XHJ'></tfoot><dl id='e6XHJ'><fieldset id='e6XHJ'></fieldset></dl></div>
  • <small id='e6XHJ'></small><noframes id='e6XHJ'>

    <tfoot id='e6XHJ'></tfoot>
    • <bdo id='e6XHJ'></bdo><ul id='e6XHJ'></ul>

    <legend id='e6XHJ'><style id='e6XHJ'><dir id='e6XHJ'><q id='e6XHJ'></q></dir></style></legend>

        我在哪里可以找到 size_t 的定义?

        时间:2023-05-24
          <tbody id='QOPLu'></tbody>

      1. <legend id='QOPLu'><style id='QOPLu'><dir id='QOPLu'><q id='QOPLu'></q></dir></style></legend>

        <small id='QOPLu'></small><noframes id='QOPLu'>

        <i id='QOPLu'><tr id='QOPLu'><dt id='QOPLu'><q id='QOPLu'><span id='QOPLu'><b id='QOPLu'><form id='QOPLu'><ins id='QOPLu'></ins><ul id='QOPLu'></ul><sub id='QOPLu'></sub></form><legend id='QOPLu'></legend><bdo id='QOPLu'><pre id='QOPLu'><center id='QOPLu'></center></pre></bdo></b><th id='QOPLu'></th></span></q></dt></tr></i><div id='QOPLu'><tfoot id='QOPLu'></tfoot><dl id='QOPLu'><fieldset id='QOPLu'></fieldset></dl></div>

                <tfoot id='QOPLu'></tfoot>

                  <bdo id='QOPLu'></bdo><ul id='QOPLu'></ul>
                • 本文介绍了我在哪里可以找到 size_t 的定义?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我看到用这种类型定义的变量,但我不知道它来自哪里,也不知道它的目的是什么.为什么不使用 int 或 unsigned int?(其他类似"类型呢?Void_t 等).

                  I see variables defined with this type but I don't know where it comes from, nor what is its purpose. Why not use int or unsigned int? (What about other "similar" types? Void_t, etc).

                  推荐答案

                  来自 维基百科

                  stdlib.hstddef.h 头文件定义了一个名为 size_t1 用于表示对象的大小.接受大小的库函数期望它们是 size_t 类型,并且 sizeof 运算符的计算结果为 size_t.

                  The stdlib.h and stddef.h header files define a datatype called size_t1 which is used to represent the size of an object. Library functions that take sizes expect them to be of type size_t, and the sizeof operator evaluates to size_t.

                  size_t 的实际类型是平台相关的;一个常见的错误是假设 size_t 与 unsigned int 相同,这会导致编程错误,2 特别是随着 64 位架构变得越来越流行.

                  The actual type of size_t is platform-dependent; a common mistake is to assume size_t is the same as unsigned int, which can lead to programming errors,2 particularly as 64-bit architectures become more prevalent.

                  来自 C99 7.17.1/2

                  以下类型和宏定义在标准头文件stddef.h

                  The following types and macros are defined in the standard header stddef.h

                  size_t

                  这是sizeof运算符结果的无符号整数类型

                  which is the unsigned integer type of the result of the sizeof operator

                  这篇关于我在哪里可以找到 size_t 的定义?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:是什么让静态变量只初始化一次? 下一篇:前面为 0 的 C++ int 更改整个值

                  相关文章

                  最新文章

                  <legend id='k0VUY'><style id='k0VUY'><dir id='k0VUY'><q id='k0VUY'></q></dir></style></legend>

                • <i id='k0VUY'><tr id='k0VUY'><dt id='k0VUY'><q id='k0VUY'><span id='k0VUY'><b id='k0VUY'><form id='k0VUY'><ins id='k0VUY'></ins><ul id='k0VUY'></ul><sub id='k0VUY'></sub></form><legend id='k0VUY'></legend><bdo id='k0VUY'><pre id='k0VUY'><center id='k0VUY'></center></pre></bdo></b><th id='k0VUY'></th></span></q></dt></tr></i><div id='k0VUY'><tfoot id='k0VUY'></tfoot><dl id='k0VUY'><fieldset id='k0VUY'></fieldset></dl></div>

                      <tfoot id='k0VUY'></tfoot>

                      <small id='k0VUY'></small><noframes id='k0VUY'>

                        <bdo id='k0VUY'></bdo><ul id='k0VUY'></ul>