Archived

This topic is now archived and is closed to further replies.

GravtyKlz

resizing array

Recommended Posts

GravtyKlz    122
Is there a way to resize an array? After the twentyth time seeing someone ask how to ask someone to enter a screen and print it backwards I finally decided ide do it and I did it with some pointers but then I thought to do it with an array but ide have to resize it(I think) in order to do it the way I want to.

Share this post


Link to post
Share on other sites
petewood    819
what languages are you thinking of using?

in c++ you can use the standard vector which can easily be resized in various ways.

using the c-style array you can allocate memory for a new array and copy the old array into it.

other languages have other capabilities.

Share this post


Link to post
Share on other sites