array of string
tebro
Posts: 1
Hi,
Can you point me how to make a array of string with "0" final for close the string.
thanks
·
Can you point me how to make a array of string with "0" final for close the string.
thanks
·
Comments
What you can do is make a large array of bytes and divide it up into multiple groups and use each group of bytes as a string. You might have a total of 100 bytes that you divide up into groups of 10 bytes. The first string would be at @string[noparse][[/noparse]0]. The 2nd string would be at @string[noparse][[/noparse]10], etc.
There are other ways to do this depending on what you want to use the strings for. Please give more information.
If your strings aren't changing, using an array of string pointers is easy to work with and is memory efficient. If you will be changing the strings at each index, I suggest Mike's approach unless you want to get into the complexity of managing a dynamic memory pool.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"I have always wished that my computer would be as easy to use as my telephone.· My wish has come true.· I no longer know how to use my telephone."
- Bjarne Stroustrup