Problem identifyinggirlfriends
User chiefoggy
Submission Time 2023-12-20 09:35:29
Score 0
Max Time N/A
Max Memory N/A

Compile Error

identifyinggirlfriends.cpp: In function ‘int main()’:
identifyinggirlfriends.cpp:19:30: error: no match for ‘operator[]’ (operand types are ‘std::pair<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >’ and ‘int’)
19 | if (name == p[i].first){
| ^
identifyinggirlfriends.cpp:20:30: error: no match for ‘operator[]’ (operand types are ‘std::pair<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >’ and ‘int’)
20 | cout << p[i].second;
| ^
identifyinggirlfriends.cpp:27:34: error: no match for ‘operator[]’ (operand types are ‘std::pair<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >’ and ‘int’)
27 | if (nickname == p[i].second){
| ^
identifyinggirlfriends.cpp:28:30: error: no match