Mike Wahler schreef:
Show your code, and perhaps explain more specifically what you want to do,
and we can offer advice.
-Mike
OK, this is the construct:
BUFFER = malloc(rows * sizeof *BUFFER);
if (BUFFER == NULL){
return false;
}
for (i=0;i<rows;i++) {
BUFFER[i] = malloc(cols * sizeof *(BUFFER[i]));
if (BUFFER[i] == NULL) {
return false;
}
}
Where ofcourse BUFFER is a double pointer (of the type CHAR_INFO** in
case you're interested). This patch of memory is probably fragmented,
and I'd like to know how to make it contiguous (just as if I were to
statically allocate memory for BUFFER). This way I can feed a pointer to
the first element to a platform-specific function which reads the memory
(and ironically, will 'treat it as if it were a 2D-array of dimension
{param1, param2}' -cheers to M$ on that one-).
--
Cheers,
John den Haan
joDhn[dot]haEan[at]chLello[dot]nl
Remove capital 'DEL' from above addy to obtain e-mail address