Mail Archives: djgpp/1999/06/28/14:00:28
Marp wrote:
> > char large_ish_matrix [720] [486]
> Why not just try it and find out :) I don't see any reason why you shouldn't
> be able to use an array this large. However, whenever I need more memory
> than just a few bytes, I use a pointer and allocate the memory from the heap
> instead.
> In C++ that would mean using the new and delete operators or in C the
> functions malloc and free. You should be able to use an array that large if
> you prefer to do it this way.
The only problem he might have is, if he declares it local, he might blow
the stack. Also, if he declares it global, funny things can happen (I've had
problems declaring large global arrays). Either way, it's best to use
malloc/new to allocate big chunks of memory (more than a few k). Also, you may
find it difficult to make a mutidimensional array using new/malloc.
--
-Rolf Campbell (39)3-6318
- Raw text -