On 7/6/15 2:15 PM, codenstuff wrote:
> I need to create following struct using malloc
>
> struct Map {
> int **entries;
> int rows;
> int cols;
> }
> Map *map_create(int rows, int cols) {
> Map *that = cast(Map*)malloc(Map.sizeof);
> that.entries = cast(int**)malloc(rows * int.sizeof);
(int *).sizeof
-Steve