Language: C
Is there a shorter way to do the following
m, n are generic values, where
m is a constant and n is a variable.
type is any primitive.
Code:
type **k=calloc(n,sizeof(type*));
for(i=0;i<n;i++)
k[i]=calloc(m,sizeof(type));
Or am I stuck with this, and should just write a function?