Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- typedef int bartyp[2][2];
- typedef struct foobar {
- bartyp *bar;
- } foo;
- int main(void){
- bartyp bar;
- foo foostruct;
- int i;
- int j;
- for(i=0; i<2; i++)
- for(j=0; j<2; j++)
- bar[i][j]=1;
- foostruct.bar = &bar;
- printf("%i\n", *foostruct.bar[1][1]);
- return 0;
- }
Add Comment
Please, Sign In to add comment