Display a map element in the Immediate Window RRS feed

  • Question

  • I posted this an hour or so ago and it suddenly disappeared  a few minutes ago so I ask again.

    I have an unordered map named decoder of type <char,int>.  It contains an element ('K', 7).  I enter ?decoder['K'] and I get
         no operator "[]" matches these operands
    If I try ?decoder.find('K') I get
         class "std::unordered_map<char,int,std::hash<char>,std::equal_to<char>,std::allocator<std::pair<char const ,int> > >" has no member "find"

    When I enter ?decoder it does print out all ten elements.

    How do I display an individual element so I can later modify it.

    Thursday, June 4, 2020 7:56 AM