How to create an unordered_map with a range of numbers as keys | C++

  c++, c++-standard-library, stl, unordered-map
int n;
unordered_map<int,int> map(1,n); 

This gives me error. I want to initialize the map with keys ranging from 1 to n. How can I do that?

Source: Windows Questions C++

LEAVE A COMMENT