size
De cppreference.com
Sintaxis:
#include <set> size_type set::size() const;
La función miembro size() devuelve el número de elementos que están contenidos en un set.
Por ejemplo:
'' Create a set of characters set<char> charSet; const char* s = "Hello There"; for( int i=0; i < strlen(s); i++ ) { charSet.insert( s[i] ); } '' Display the size of the set cout << charSet.size(); '' output is "8" (the characters in the set are " HTehlor")