December 17th, 2012, 09:29 AM
Can I resize a Delphi array without losing its previous contents?
I have a dynamic array. But initially I am not knowing the length of the array. Can I do like first I set the length of it as 1 and then increase length as I needed without lost of previously stored data?
any one help me...
December 17th, 2012, 01:09 PM
Just create a TStringList object and Add() or AddObject() to it .
my_array : TStringList;
my_array := TStringList.Create;
for i := 0 to my_array.Count - 1 do
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne
"I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo
December 18th, 2012, 04:51 AM
I think you should not ask this question. By writing a few simple lines of code you wll get the answer immediately.
So, I recommend you to hurry write the lines and report back the result