Re: Using pointers
From: Dan Moos (dan.moos_at_verizon.net)
Date: 02/09/04
- Next message: Eli: "Re: collect2: ld returned 1 exit status"
- Previous message: J.: "STL: Priority Queues"
- In reply to: Martijn Lievaart: "Re: Using pointers"
- Next in thread: Joec: "Re: Using pointers"
- Reply: Joec: "Re: Using pointers"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
- Next message: Eli: "Re: collect2: ld returned 1 exit status"
- Previous message: J.: "STL: Priority Queues"
- In reply to: Martijn Lievaart: "Re: Using pointers"
- Next in thread: Joec: "Re: Using pointers"
- Reply: Joec: "Re: Using pointers"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|