resizing array

Started by
2 comments, last by GravtyKlz 21 years, 1 month ago
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.
Advertisement
you cannot resize an array (period)

_
(0110101101000110)The Murphy Philosophy: Smile . . . tomorrow will be worse.
What language are you using?
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.

This topic is closed to new replies.

Advertisement