これが私がやりたいことです:
//Define a structure to store multistep sequences.
struct Command
{
int Steps; //Number of steps in the seq
int StepCount; //must be set to -1
int Seq[Steps][NUMSERVOS + 1];
};
たとえば、Command初期化は次のようになります。
Command Home = {1,-1,{90, 90, 90, 90, 90, 90, 1000}};
この行はArray Seq、サイズ[7][1]( NUMSERVOS == 6)を持つ int になります。
Array Seq[][]に保持されている値で を初期化したいSteps。
問題はそれです:
Steps定数整数ではありません。Steps静的ではありません。
とにかく、配列の前に初期化されたメンバーを使用して配列にメモリを動的に割り当てることができますか?