Problem | pigeons |
---|---|
User | Memeathon |
Submission Time | 2025-02-09 11:04:56 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
pigeons.cpp: In function ‘int main()’:
pigeons.cpp:13:13: error: no match for ‘operator[]’ (operand types are ‘std::unordered_map<std::__cxx11::basic_string<char>, std::function<void()> >’ and ‘int’)
13 | commandMap[inp]();
| ^
In file included from /usr/include/c++/9/unordered_map:47,
from /usr/include/c++/9/functional:61,
from /usr/include/c++/9/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/9/algorithm:71,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from pigeons.cpp:1:
/usr/include/c++/9/bits/unordered_map.h:985:7: note: candidate: ‘std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type& std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](const key_type&) [with _Key = std::__cxx11::basic_string<char>; _Tp = std::function<void()>; _Hash = std::hash<std::__cxx11: