/ Published in: C
Expand |
Embed | Plain Text
#include<stdio.h> #include<stdlib.h> struct frame{ int **a; int set; }; int main(){ int nrows = 10; int ncols = 10; int i,j; struct frame *F; F = (struct frame *) malloc( sizeof(struct frame) ); F->a = malloc( sizeof(int *) * nrows ); for(i=0; i<nrows; i++) F->a[i] = malloc(sizeof(int) * ncols ); for(i=0;i<nrows;i++) for(j=0;j<ncols;j++) F->a[i][j] = i*10 + j; for(i=0;i<nrows;i++){ for(j=0; j<ncols; j++){ } } return 0; }
You need to login to post a comment.
