Home > Back-end >  Defines a nested structure C, initialization, tip: C2078 initializers value too much.
Defines a nested structure C, initialization, tip: C2078 initializers value too much.

Time:10-09

# include & lt; stdio.h>
# include & lt; Stdlib. H>
# include & lt; Iostream>
using namespace std;
Typedef struct {
Int p;
int i;
Int d;
int a;
} Pid;

Typedef struct {
int a;
Int b [3].
} Fpa.
Typedef struct {
Pid Pid [4];
Fpa Fpa.
} the Page;

Typedef struct {
Int uvin;
Int ovin;
} Global;

Typedef struct {
Global Global;
Page Page [2];
} CfgData;

CfgData g_cfg={
{
8, 10,
},
{
{
{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0},
},
{
0,
{0, 0, 0}
},
},

{
{
{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0},
},
{
0,
{0, 0, 0}
},
},
};


Void main (void)
{
Cout & lt; return;
}

CodePudding user response:

CodePudding user response:

The definition of what you wrote and you completely in ah,

CodePudding user response:

Such a complex structure, definition and head all dizzy, the individual feels error is normal, not making mistakes is not good code