Help with dynamic allocation?

im having a problem figuring out exactly how to fill a dynamically allocated array of doubles.

bool getData(double **x, double **y, int n)
my function is passed these two pointers to pointers and, in the end, they are supposed to point to the addresses of dynamically allocated arrays of n doubles.

Rather than cin>>*x[index]; You should perhaps try: cin>>(*x)[index]; Precedence of [ ] is higher than *http://ocw.kfupm.edu.sa/user/ICS43153/Reference/C-Reference/C-Prog/section3_16.html
The the statement you wrote in the first post will be interpreted like this:
*(*(x+index))
As you can see, this has got no meaning.
Rather the code I just gave would be interpreted like this:
*((*x)+index)
which definitely have a meaning