在C ++中的向量< int> :: size_type [英] vector<int>::size_type in C++

查看:147
本文介绍了在C ++中的向量< int> :: size_type的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个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()的成员函数类别X

For example, for X::x(){...}, we say that x() is a member function of class X.

推荐答案

size_type 向量< int> 类型的(静态)成员类型。通常,它是 std :: size_t typedef ,其本身通常是 typedef

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 ++中的向量&lt; int&gt; :: size_type的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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