How do I fix this error message error: no match for ‘operator[]’

I am implementing a class that involves unordered_sets, and unordered_maps. When I go to run the program it gives me the following error error: no match for ‘operator[]’ (operand types are ‘std::unordered_set<std::__cxx11::basic_string<char> >’ and ‘const string’ {aka ‘const std::__cxx11::basic_string<char>’}) int points = Prizes[Codes[code]]->points; I am unsure of how to fix this, please help. I have… Read More How do I fix this error message error: no match for ‘operator[]’

Runtime Error. Addition of unsigned offset

I was solving Increasing Subsequences in LeetCode and it is giving error continuously. Tried in different IDEs with same test cases working every time. Even after brainstorming for an hour or two I was unable to find the error. Here is my C++ solution. class Solution { public: vector<vector<int>>ans; vector<vector<int>> findSubsequences(vector<int>& nums) { vector<int>prev; calc(nums,prev,0);… Read More Runtime Error. Addition of unsigned offset