2D primitive array of variable x values

Hello! I am excited to be joining a nice community such as this one. I've been writing in Java for a long time. However, I enjoy learning C++.

I've been searching all over the internet for this answer, and I can not understand the best way to do this:

 
  short lookup [][] = {{0,0},{1,0,0,1},{2,0,0,2},{3,0,0,3},{4,0,0,4},{5,0,4,3,3,4,0,5},...}


There are roughly 300. In Java, this is simple. But in C++ this is not working. Any advice on how to approach this?

If I made a vector< vector<int> > lookup = {{0,0},{1,0,0,1},{2,0,0,2},{3,0,0,3},{4,0,0,4},{5,0,4,3,3,4,0,5},...}

Would this work?

Thanks,
Connor.
Topic archived. No new replies allowed.