Standard C++ Library Class Reference

}
int main()
{
play_poker();
print_current_hand(current_hand.begin(),current_hand.end());
return 0;
}
Output :
aceofspades
kingofspades
queenofspades
jackofspades
tenofspades
Warnings
Member function templates are used in all containers provided by the Standard Template
Library. An example of this is the constructor for deque<T, Allocator> that takes two templated
iterators:
template <class InputIterator>
deque (InputIterator, InputIterator);
deque also has an insert function of this type. These functions, when not restricted by compiler
limitations, allow you to use any type of input iterator as arguments. For compilers that do not
support this feature we provide substitute functions that allow you to use an iterator obtained
from the same type of container as the one you are constructing (or calling a member function
on), or you can use a pointer to the type of element you have in the container.
For example, if your compiler does not support member function templates you can construct a
deque in the following two ways:
int intarray[10];
deque<int, allocator> first_deque(intarray, intarray + 10);
deque<int, allocator> second_deque(first_deque.begin(),
first_deque.end());
But not this way:
deque<long, allocator> long_deque(first_deque.begin(),
first_deque.end());
since the long_deque and first_deque are not the same type.
Additionally, many compilers do not support default template arguments. If your compiler is
one of these, you need to always supply the Allocator template argument. For instance, you'll
have to write:
deque<int, allocator>