#include<stdlib.h>
#include<stdio.h>
#include<stdint.h>
int main()
{
uint8_t test[8]={1};
struct b_t {
uint8_t *data;
};
struct a_t {
struct b_t *b;
};
struct a_t *a = (struct a_t*)malloc(sizeof(struct a_t));
a->b = (struct b_t*)malloc(sizeof(struct b_t));
a->b->data = malloc(8*sizeof(uint8_t));
a->b->data = test;
printf("%d\r\n",*(a->b->data));
return 0;
}
|