struct test
{
unsigned int test1;
unsigned char test2[4096];
unsigned int test3;
} foo
struct foobar
{
unsigned char data[4096];
}
if i want to access the struct, i say foo.test1, foo.test2[4096], etc..
however, when I wish to return the data present in foo.test2 in the following manner
pac.datafoo = foo.test2[4096];
unsigned char data[4096] = pac.datafoo;
this is the error I get:
error: initialization with "{...}" expected for aggregate object
what is the mistake i'm doing?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…