Q
Hi Here is part of my code
typedef struct{
int len;
char code[16];
}Code;
typedef struct{
....
Code *a;
....
}List;
Now I'd like to print the content.
I have
Code tmpA;
List list;
tmpA=5;
memcpy(code,"12345",5);
list.a = &tmpA;
printf("a(len=%d,value=(%s))\n",list.a->len,list.a->code);
however it seems that something wrong, the print out is not right.
typedef struct{
int len;
char code[16];
}Code;
typedef struct{
....
Code *a;
....
}List;
Now I'd like to print the content.
I have
Code tmpA;
List list;
tmpA=5;
memcpy(code,"12345",5);
list.a = &tmpA;
printf("a(len=%d,value=(%s))\n",list.a->len,list.a->code);
however it seems that something wrong, the print out is not right.