Ragged Array and Pointers

1. Prompt for user ID, station, and lab.
2. Fixed array[SIZE]; SIZE = 4.
3. Each array points to dynamic array

So do i have the user determine the array size with the pointer? I'm so confused how to do a ragged array. I get
that its a multidimensional array with multiple inputs and outputs. But how do I go about prompting the user for it
and printing out each possible outcome? Like user says station 1, lab 2, and their custom id number. I hate being
confused.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <iostream>

using namespace std;

int main ()
{
  int *lab1, *id, *station;
  cout << "What station are you going to be on? ";
  lab1 = int[i];
  cin >> i;
  if (lab1[0] == 0)
  {
      cout << "Error";
  }
  else
  {
	for (lab=0; n<i; n++)
	{
	  cout << "Enter ID number: ";
	  cin >> lab[n];
	}
	cout << "You have entered: ";
	for (lab=0; n<i; n++)
	  cout << lab[n] << ", ";
	delete[] p;
  }
  return 0;
}
Topic archived. No new replies allowed.