I'm trying to create a continuous block of memory in one function call that has the first part of the memory as pointer arrays to the other blocks. The function works with an index notation though I'd like to use compact pointer
Type **TwoD(size_t rows, size_t cols)
{
Type **p1, **prows, *pcol;
p1 = (Type **)malloc(rows * sizeof(Type *) + rows * cols * sizeof(Type));
// ??? something wrong here ??? I'd rather use this style if possible
//
//index notation works
return prows;
}