vector::size_type in C++

后端 未结 3 457
自闭症患者
自闭症患者 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:48

    vector is a template

    so the vector type templated with int has a member typedef called size_type. x is defined as a variable of that type.

提交回复
热议问题