Mail Archives: djgpp/1997/05/03/10:17:42
Hi,
I'm new to djgpp, and even C/C++. I'm not however new to programming ;)
Anyway, one of the cool things about djgpp is it's protected mode stuff,
allowing you to easily use extended memory.
I decided to try this out with a simple array. Here's my program:
#include <stdio.h> // I know I don't need this, but hey...
int main(void)
{
int q[100][100][100];
q[80][80][80] = 44;
printf("%d", q[80][80][80]);
return 0;
}
This array should only use about a meg, and so it should have plenty of
space with extended mem etc.
However, when I run it the program quits with an error - presumably because
it ran out of memory. It works fine for small arrays though.
How can I use large arrays like this - there must be a way in djgpp to
store them using extended memory.
Any suggestions?
Thanks,
Matthew
- Raw text -