redefine 2D array content
in
Programming Questions
•
1 year ago
Hi,
I am struggeling with the following:
I define two 2D arrays (
GaitSTOP &
GaitFWD) as values for a container array
Gait1:
- int GaitSTOP[][]= {
- { O1C, U1C, O2C, U2C, O3C, U3C, O4C, U4C, 200}
- };
- int GaitFWD[][]= {
- { O1H, U1C, O2C, U2O, O3C, U3C, O4H, U4O, 200},
- { O1H, U1C, O2C, U2C, O3C, U3C, O4H, U4C, 200},
- { O1C, U1O, O2H+10, U2C, O3H-5, U3O, O4C, U4C, 200}
- };
- int Gait1[][]=GaitSTOP;
I now want to change the content on
Gait1 during runtime between the two other arrays.
I do it like this:
- Gait1[][]=GaitFWD;
- Gait1[][]=GaitSTOP;
But the content doesn't seem to change.
What is the correct way to replace the complete content for an array?
Thanks
Robert
1