0

そのため、以下で宣言された構造体の次の構造体変数への呼び出しを入力すると、正常に見えますが、コンパイラは奇妙なエラーをスローし続けます。宣言の何が問題なのですか?

 struct makeFileSets {
       char target[50];                     // array of targets
       char sources[80][50];                    // an array of sources
       char commands[80][50];                   // an array of command lines (non seperated)
       int sourcesTag;                          // current number of sources
       int commandsTag;                     // current number of command lines
       struct commandLineSets {
           int makeFileNum;             // represets an index for the makefile they corresond to
           int numVariables;                // the # of variables
           int numOptions;                  // the # of options
           int numCommands;             // the # of commands
           char variables[80][50];          // represents variables in each command line
           char options[20][20];            // represents option tags in each command line
           char commands[80][50];           // represents the commands from the command line
        } myCommands[50];
   };
4

2 に答える 2

4

その構造体に問題はありません。

于 2012-11-11T20:24:47.400 に答える
1

コマンド[]を2回初期化しているようです。

于 2012-11-11T20:23:20.703 に答える