我的嵌套结构声明有什么问题吗?

时间:2012-11-11 20:20:45

标签: c nested structure nested-forms

因此,当在下面声明的结构中键入对nexted结构变量的调用时,它看起来看起来很正常,但是编译器一直在抛出奇怪的错误。知道声明可能有什么问题吗?

 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];
   };

2 个答案:

答案 0 :(得分:4)

该结构没有问题。

答案 1 :(得分:1)

似乎你的初始化命令[]两次。