I am trying to make a Monte-Carlo simulation in C++, and in that respect I need to store two values x and y in a 2D array.
Here is the situation: I have a loop running until some condition is satisfied. For ever iteration I want to write a pair of values (x, y) to my array, but the problem is that I don't know how many iterations there will be until the loop stops.
So my question is how I can make a 2D-array dynamically?
Thanks for any help.