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?
For example, for X::x(){...}
, we say that x()
is a member function
of class X
.
Best Answer
size_type
is a (static) member type of the typevector<int>
. Usually, it is atypedef
forstd::size_t
, which itself is usually atypedef
forunsigned int
orunsigned long long
.