Assigning float numbers to 2D arrays.

Hi!
I want to work with a 2d array but I get problems when trying to assign values to it. The problem might as well be in the construction of the array since I'm very new to this.
This is the code:
1
2
3
4
5
6
7
void Init(int *no_of_nodes){
float  (*tweights)[2];
tweights = new float [*no_of_nodes][2 ];
for(int i=0; i<(*no_of_nodes); i++){
	tweights [i][0] = (*TWstart)[i];
}
}

I get the error below (At line 5) when I'm compiling it.

invalid types `float[int]' for array subscript
closed account (z05DSL3A)
http://www.cplusplus.com/doc/tutorial/arrays.html
I "solved" the problem. Probably the problem was that the input *no_of_nodes was sent in a wrong way. However ,I use another solution now.
Thanks anyway
Topic archived. No new replies allowed.