To connect the map and pair you need to write
#include <map> or
#include <map> #include <utility> ?
To connect the map and pair you need to write
#include <map> or
#include <map> #include <utility> ?
The C ++ language standard does not regulate how the header files are related. To get the most portable program text between compilers, you need to search for a header with an explicit definition of the desired type (for example, on the site http://www.cppreference.com ) and include it.
map is enough, there is a link to the description of the map CppReference Map , as you can see the pair already part of the map library.
If interested, here stl_map.h implementation of stl :: map
Source: https://ru.stackoverflow.com/questions/518665/
All Articles