Maps - Where "keys" and "values" are the same

Hi everyone,

In what applications would it make sense for the key and value in a map to be the same?
None, you would be using a std::set instead (unless you're talking about types only).
I thought as much.
In my textbook, "Data Structures and Algorithms in C++", it states "In some applications, the key and the value may be the same." That may be true, but intuitively I wondered if that still follows behind the purpose of a map.
Topic archived. No new replies allowed.