View Single Post
  #6 (permalink)  
Old 09-14-2008, 01:50 PM
WingedPanther's Avatar   
WingedPanther WingedPanther is offline
Super Moderator
 
Join Date: Jul 2006
Age: 35
Posts: 4,092
Last Blog:
Why Learn Data Structu...
Credits: 28
Rep Power: 45
WingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to behold
Default Re: Reallocate Memory

A better option is to use a vector instead of an array. You can indicate the initial size, and it will automatically grow as needed if you exceed that size. That will remove the need to handle memory allocation yourself.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum
Programming is a branch of mathematics.
Reply With Quote