How to declare a TComplex 2D array?

I’m trying to declare a 2D array with variable size and where all elements are of the class TComplex. My guess is:
TComplex **Complex_matrix()= new TComplex[rows][col];

but it doesn’t work. Does anyone have an idea of how to do this?

I’m using root 5.

My problem is so much how to create a multidimensional array in general but how to do it with the TComplex class. There is nothing about it in the class reference and I can’t get i to work if I do it as I would for a normal double or integer. Do you know what the syntax should be for a 2D TComplex array?

TComplex is an ordinary class, like “double” / “Double_t” or “int” / “Int_t”.

but when I do

TComplex **Complex_matrix()= new TComplex[rows][col];

which is what I would do for e.g. a double_t it doesn’t work and gives errors like:

"function ’ TComplex Complex_matrix()** ’ is initialized like a variable "
" invalid pure specifier (only ’ = 0 ’ is allowed) before ’ TComplex ’ ".

Do visit the links which I gave you in my first post here.

I will, thank you for your anwers.