0

PLEASE HELP I have this array list, each index having a different length linked list embedded. How do I print this?

#include <list>
#include <etc...>

for (int i = 0; i < N; i++) {
   std::cout << "Number of elements in row " << i << endl;
   std::cin >> s;
   s = s * 2;

   for (int j = 0; j < s; j++){
        std::cin >> k;
        listArray2[i].push_back(k);
   }

}
2
  • 1
    Possible duplicate of dealing with array of linked list Commented Feb 10, 2016 at 3:38
  • 2
    Do you know how to print one list? Commented Feb 10, 2016 at 4:17

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.