im getting segemented fault error here when i enter 100000 for row and question. would i have to create this array in heap or am i doing something else wrong?
so the code is gets 2 inputs first tells how many rows are created and second is how many questions are asked
then each row gets a number telling that row to contain that much element.
then a question is asked where it gets the row and index of that row's element.
The stack's memory space is in the magnitude of a few MB. You're trying to allocate 40 GB, as dutch said. Won't work.
In addition, array sizes must be known at compile-time. Your lines 6 and 14 are Variable-Length Arrays (VLA), and are not legal C++. If you're just practicing, just make a sanely-sized array, like 100x100, and don't let the user enter a number above that.