Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- typedef struct
- {
- char value;
- } a;
- typedef struct
- {
- a **vvalue;
- } b;
- int main(int argc, char const *argv[])
- {
- b *t = malloc(sizeof(b));
- t->vvalue = malloc(sizeof(a *) * 2);
- t->vvalue[0] = malloc(sizeof(a));
- t->vvalue[1] = malloc(sizeof(a));
- t->vvalue[0]->value = 'a';
- t->vvalue[1]->value = 'b';
- printf("%s%c%c", "\n", t->vvalue[0]->value, t->vvalue[1]->value);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement