Facebook
From jallan, 3 Years ago, written in C.
Embed
Download Paste or View Raw
Hits: 84
  1. So an example would be something like this
  2.  
  3.  
  4. typedef struct { //define your object, in this case it's a struct (structure - kinda like a two dimensional array)
  5.     malloc(sizeof(struct a) *n) { //allocate n bits of memory to the struct
  6.         printf("allocated n bits");
  7.     } free(struct) { //returning the memory back to the pool
  8.     } return 0; // end the function
  9. }