Category : stdlist

I was following a hash table implementation online (https://www.youtube.com/watch?v=2_3fR-k-LzI) when I observed the video author initialize a std::list with an array index. This was very confusing to me as I was always under the impression that std::list was always meant to operate like a linked list and was not capable of supporting random indexing. However, ..

Read more

I’m trying to print the value inside the map named as GameMap. std::map<std::string, std::map<int,std::list<int>>>GameMap; but I keep getting these errors no operator matches these operands operand types are: std::basic_ostream<char, std::char_traits<char>> << std::map<int, std::list<int, std::allocator<int>>, std::less<int>, std::allocator<std::pair<const int, std::list<int, std::allocator<int>>>>> here is the part of the code: for (int y = 0; y <= 3; y++) ..

Read more