这个 C++ 语句是什么意思?
What is meant by this C++ statement?
vector<int>::size_type x;
而且,这里的作用域运算符 :: 有什么用?换句话说,我们如何用英语阅读这个声明?
And, what is the use of the scope operator :: here? In other words, how do we read this statement in English?
例如对于X::x(){...},我们说x()是一个成员函数class X.
For example, for X::x(){...}, we say that x() is a member function of class X.
size_type 是 vectorstd::size_t 的 typedef,它本身通常是 unsigned int 的 typedef 或unsigned long long.
size_type is a (static) member type of the type vector<int>. Usually, it is a typedef for std::size_t, which itself is usually a typedef for unsigned int or unsigned long long.
这篇关于C++中的vector<int>::size_type的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
fpermissive 标志有什么作用?What does the fpermissive flag do?(fpermissive 标志有什么作用?)
如何在我不想编辑的第 3 方代码中禁用来自 gccHow do you disable the unused variable warnings coming out of gcc in 3rd party code I do not wish to edit?(如何在我不想编辑的第 3 方代码中禁
使用 GCC 预编译头文件Precompiled headers with GCC(使用 GCC 预编译头文件)
如何在 OS X 中包含 omp.h?How to include omp.h in OS X?(如何在 OS X 中包含 omp.h?)
如何让 GCC 将 .text 部分编译为可写在 ELF 二进制文How can I make GCC compile the .text section as writable in an ELF binary?(如何让 GCC 将 .text 部分编译为可写在 ELF 二进制文件中?)
GCC、字符串化和内联 GLSL?GCC, stringification, and inline GLSL?(GCC、字符串化和内联 GLSL?)