Assign array to multidimentional array

 

Hello, I do not get what is wrong:


CHistoryPosition historyPosition;  

      string header[5];

      header[0] = "Time close";

      header[1] = "Win/Loss by MT4";

      header[2] = "Win by me from difference";

      header[3] = "Loss from swap";

      header[4] = "Loss from commission";

      

      

      string rows[1000][5];   // assuming no more than 1k will be tickets

      

      rows[0] = header;


Assigning values to single dimention array works good. But when I want to assing array to array - getting


'rows' - invalid array access


How to assign array to multidimentional array?


 
Poker_player:

Hello, I do not get what is wrong:



Assigning values to single dimention array works good. But when I want to assing array to array - getting


'rows' - invalid array access


How to assign array to multidimentional array?


Hello,
Il you have multidimensional array  you must access with :

rows[0][0] = header[0]; // for example:
 
remcous:
Hello,
Il you have multidimensional array  you must access with :

rows[0][0] = header[0]; // for example:

But that way it would be only one item added.

You mean I need to write loop for each item? In php I would simply assign array. I would expect same here.

But if there is only way to do loop, its better than nothing :) thanks.