vector::size_type in C++

后端 未结 3 469
自闭症患者
自闭症患者 2020-11-27 03:27

What is meant by this C++ statement?

vector::size_type x;

And, what is the use of the scope operator :: here? In ot

3条回答
  •  天涯浪人
    2020-11-27 03:37

    size_type is a (static) member type of the type vector. Usually, it is a typedef for std::size_t, which itself is usually a typedef for unsigned int or unsigned long long.

提交回复
热议问题