I've searched far and wide and can't find an answer. Why can't I access the elements? It gives me the error: "Expression must have a class type". I have no idea what this means. Can someone give me a solution to this please?
#include <iostream>
#include <vector>
#include <map>
#include <utility>
#include <algorithm>
int main()
{
std::vector<std::map<int, unsigned char>>grid =
{
{std::make_pair(1,'-'), std::make_pair(2,'-'), std::make_pair(3,'-') },
{std::make_pair(4,'-'), std::make_pair(5,'-'), std::make_pair(6,'-') },
{std::make_pair(7,'-'), std::make_pair(8,'-'), std::make_pair(9,'-') }
};
//This doesn't work
std::cout << grid.at(0).at(0).second
}