B
baumann@pan
hi all,
#include "stdafx.h"
struct a_{
int a;
int b;
};
struct a_ a1 ,a2, a3, a4, a5, a6;
#if 0
struct a_ m[6] = { a1,a2,a3,a4,a5,a6};
#endif
int a[6] = { 1, 2, 3, 4, 5, 6};
int main(int argc, char* argv[])
{
printf("Hello World!\n");
return 0;
}
the above code tells me struct a_ m[6] ={ }; statement is wrong,
but why int a[6] ={}; is ok?
i know if i write struct a_ m[6] = {
{a1.a,a1.b},{a2.a,a2.b},{a3.a,a3.b},{
a4.a,a4.b},{a5.a,a5.b}}; it will be ok, i have not test the idea.
#include "stdafx.h"
struct a_{
int a;
int b;
};
struct a_ a1 ,a2, a3, a4, a5, a6;
#if 0
struct a_ m[6] = { a1,a2,a3,a4,a5,a6};
#endif
int a[6] = { 1, 2, 3, 4, 5, 6};
int main(int argc, char* argv[])
{
printf("Hello World!\n");
return 0;
}
the above code tells me struct a_ m[6] ={ }; statement is wrong,
but why int a[6] ={}; is ok?
i know if i write struct a_ m[6] = {
{a1.a,a1.b},{a2.a,a2.b},{a3.a,a3.b},{
a4.a,a4.b},{a5.a,a5.b}}; it will be ok, i have not test the idea.