my problem here is that, since the inner arrays are not even, it seems like i need a for-loop for every element of p but i do not believe that that is an ideal solution to my problem because, what if p had 100 elements? does that mean i need 100 for-loops? I don't think so. If anyone has a better idea to solve this problem i would really appreciate it. thanking you in advance
@TheDestroyer, Your idea is good, but what i don't like about it is that I have to manually specify the size for each inner array, which takes me back to the question of "What if i've got 100 inner arrays".
@JLBorges, what does the following statement do. vector<int>( i%10 + 5, i ) ; and is it possible to make this a dynamic vector?