Why use Dynamic and Static Memory Allocation...

Please support our C advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Jan 2005
Posts: 188
Reputation: Fasola is an unknown quantity at this point 
Solved Threads: 0
Fasola Fasola is offline Offline
Junior Poster

Why use Dynamic and Static Memory Allocation...

 
1
  #1
Feb 28th, 2005
First how do you use Dynamic and Static Memory Allocation?

and why is supposed to be so popular in use?
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,802
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 747
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: Why use Dynamic and Static Memory Allocation...

 
0
  #2
Feb 28th, 2005
  1. char a[256]; // Static allocation
  2. char *p = new char[256]; // Dynamic allocation
>and why is supposed to be so popular in use?
You aren't restricted to a "one size fits all" strategy, and you can generally grab more memory from the dynamic pool than from the "stack".
I'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Join Date: Jan 2005
Posts: 188
Reputation: Fasola is an unknown quantity at this point 
Solved Threads: 0
Fasola Fasola is offline Offline
Junior Poster

Re: Why use Dynamic and Static Memory Allocation...

 
0
  #3
Feb 28th, 2005
^^^

i am really starting to like you

thanx again
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for C
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC