Accessing a size_type of vector inside a structure : I have got a structure 

    structue str{
     std::vector<double> values;
    }

And I have got a for loop in my program that interates through values in this vector and these codes work:

    for (vector::size_type i = 0; i < str.values.size(); i++) {
and

    for (size_t i = 0; i < str.values.size(); i++) {
but I know that it should be done somehow like here but I have got an error. How to get this size?

    for (str::values::size_type i = 0; i < str.values.size(); i++) {

And I know that I could use

    for (auto i : str.values)
but I also need number of iteration, not only double value that is in that vector. Is it possible using this solution?