Assigning array values

I have a question about assigning arrays values from other parts of the array.

For the example below, line_number is a 2d array of integers (line_number[...][...]), and index is an integer, yet when I run it, it gives me an array saying "invalid array assignment".

(Below is part of a loop)

 
line_number[index] = line_number[index-1];


Do I need to add the second dimension of the array to it? When I assign a string array another string array, I don't need the second dimension. Any help is appreciated!
If you have a 2D array, no, you can't simply copy one outer array to another outer array.

Do a nested loop and copy over each element.
Last edited on
When I assign a string array another string array, I don't need the second dimension.

What do you mean by this? Can you give an example?
Topic archived. No new replies allowed.