size_t c++
时间: 2024-03-31 18:08:52 浏览: 120
根据引用和引用,std::size_t是一个无符号整数类型,它可以存储任何类型(包括数组)的理论上可能的最大对象的大小。它还可以用于存储非成员指针的值,可以视作std::uintptr_t的同义词。在C/C++中,可以使用typedef将size_t定义为unsigned int或unsigned long的别名。它可以用于sizeof运算符、sizeof...运算符和alignof运算符的结果。因此,"size_t c"声明了一个名为c的变量,它的类型是size_t。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [C/C++ - size_t - std::size_t](https://blog.csdn.net/chengyq116/article/details/104733954)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [【C/C++】size_t详解](https://blog.csdn.net/qq_34018840/article/details/100884317)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文