|
-
Sep 4th, 2002, 08:06 AM
#1
Thread Starter
Lively Member
Need more efficient way to append character arrays
Hey my character array stores a list of items but my implementaion is very inefficient. Here is what I do:
1. I Create a buffer of 100 chars.
2. My function search for the items in a text file.
3. If the list goes over 100 chars then i create new char * and move all the list to the new one.
3. If the list goes over 100 chars then i create new char * and move all the list to the new one.
step 3 is my problem because I'm creating a new buffer for the whole list everytime when the list needs more space.
Is it possible to append the new buffer to the old list, instead of creating a new buffer for the whole list?
Thanx in advance
PS: I can't use linked list because I need to pass the items back to client app.
Last edited by XfoxX; Sep 4th, 2002 at 08:10 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|