M
mukesh
Hi,
compilation of below code results in error "too many initailizer for
s3".
what could be the possible cause ?
Thanks,
Mukesh
++++++++++++++++++++++++++++++++++++
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct {
int n1;
char c;
}s1;
typedef struct{
int n2;
s1 s1v[20];
}s2;
typedef struct {
int n3;
s2 s2v[20];
}s3;
static s3 val[] =
{
{1,
{20,
{
{1, 12},
{1, 12}
}
}
,{20,
{
{1, 12},
{1, 12}
}
},
},
{2,
{20,
{
{1, 12},
{1, 12}}
}
}
};
int main()
{
printf("\n hello world\n");
return 0;
}
++++++++++++++++++++++++++++++++++++
compilation of below code results in error "too many initailizer for
s3".
what could be the possible cause ?
Thanks,
Mukesh
++++++++++++++++++++++++++++++++++++
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct {
int n1;
char c;
}s1;
typedef struct{
int n2;
s1 s1v[20];
}s2;
typedef struct {
int n3;
s2 s2v[20];
}s3;
static s3 val[] =
{
{1,
{20,
{
{1, 12},
{1, 12}
}
}
,{20,
{
{1, 12},
{1, 12}
}
},
},
{2,
{20,
{
{1, 12},
{1, 12}}
}
}
};
int main()
{
printf("\n hello world\n");
return 0;
}
++++++++++++++++++++++++++++++++++++