Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

unordered_map::size_type

The type of an unsigned distance between two elements.

typedef T2 size_type;

The unsigned integer type describes an object that can represent the length of any controlled sequence. It is described here as a synonym for the implementation-defined type T2.

 

// std_tr1__unordered_map__unordered_map_size_type.cpp 
// compile with: /EHsc 
#include <unordered_map> 
#include <iostream> 
 
typedef std::unordered_map<char, int> Mymap; 
int main() 
    { 
    Mymap c1; 
    Mymap::size_type sz = c1.size(); 
 
    std::cout << "size == " << sz << std::endl; 
 
    return (0); 
    } 
 
size == 0

Header: <unordered_map>

Namespace: std

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.