int puzzle1[9] = {0,1,2,3,4,5,6,7,8}; int puzzle2[9] = {8,7,6,5,4,3,2,1,0}; int puzzle3[9] = {1,4,7,2,5,0,8,3,6}; int puzzle4[9] = {3,2,0,1,6,5,4,8,7}; vector<int*> *adj; adj = new vector<int*> (4); adj[0].push_back(puzzle1); adj[0].push_back(puzzle2); adj[0].push_back(puzzle3); adj[0].push_back(puzzle4); cout<<adj[0][0][3];
In this code, I tried insert an array in adjacency list, but I cant access the 3 dimension. How can I do this?
Its important that allocate the vector.