Re: Using pointers

From: Dan Moos (dan.moos_at_verizon.net)
Date: 02/09/04


Date: Sun, 08 Feb 2004 23:37:57 GMT


I am also a beginner, but will try and give my thoughts also.

Dynamic memory is a good way to go when you don't know ahead of time how
many objects your gonna have. Like, say a 3D rendering program, in which the
item being drawn has 10 or 10,000 triangles. It is inefficient to make an
array or other structure that is big enough to hold the largest number of
objects you predict you'll need. It's wastefull to dedicate an array of
10,000 units when you might only need 10.



Relevant Pages

  • Re: Using pointers
    ... > Dan Moos wrote: ... >> I am also a beginner, but will try and give my thoughts also. ... >> Dynamic memory is a good way to go when you don't know ahead of time how ... >> array or other structure that is big enough to hold the largest number ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Using pointers
    ... Dan Moos wrote: ... > Dynamic memory is a good way to go when you don't know ahead of time how ... It's wastefull to dedicate an array of ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Real Beginner
    ... I am a real beginner so at the risk of being slammed by some, ... my $lastperson = shift @peoplec; ... Then you shouldn't have to iterate through each item of the array, or 'shift' off items from a duplicated array. ...
    (perl.beginners)
  • Re: Efficiency Question: Large Arrays vs. Indexed Files on Alphas
    ... >decide to read some fields of some records into an array and ... >maintain records that will eventually be written to an output file ... saved the entire file contents in dynamic memory and the SOR$ utility ... routines to sort them, then formatted the records for the output file. ...
    (comp.os.vms)
  • Re: Does Array Declaration Provide Zero Initial Values ??
    ... drop the beginner description. ... printed really big letters on fanfold paper, ... filled up a 120 by 60 array for each letter, and then printed that, ...
    (comp.lang.fortran)