CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2005
    Posts
    3

    Question mutiple strings to handle ???

    Hi,
    I have a 4 string of arrays with which I need to simultaneously access them by index or by key. Sorting is an option but not needed. Is there any efficient (performance and memory management are critical) way of doing this? All the responses are welcome. Please let me know as I have been struggling with quite some time now.

    Thanks for your help in advance.

  2. #2
    Join Date
    Feb 2004
    Location
    where Eurasian, Pacific and Philippine tectonic plates meet
    Posts
    229

    Re: mutiple strings to handle ???

    can you show some code so that we can help you?
    "Such ingratitude after all the times I saved your life." (imdb quotes)
    A bit of history.

  3. #3
    Join Date
    Oct 2002
    Location
    Singapore
    Posts
    3,128

    Re: mutiple strings to handle ???

    You can try std::map.

  4. #4
    Join Date
    Jul 2005
    Location
    Russian Federation. Moscow
    Posts
    152

    Post Re: mutiple strings to handle ???

    or MFC's CMap class

  5. #5
    Join Date
    May 2005
    Location
    Oregon
    Posts
    3,725

    Lightbulb Re: mutiple strings to handle ???

    you can use CList or CSimpleArray etc

  6. #6
    Join Date
    Aug 2005
    Posts
    3

    Re: mutiple strings to handle ???

    OK, Here is the piece of code I was using. This works fine in XP But I see problem with Win CE version.

    CStringArray csType;
    CStringArray csVel;
    CStringArray csAttn1;
    CStringArray csAttn2;
    CStringArray csAttn3;

    The array will grow as user enters the data of each one. I ma updating or removig the data from array with Index of each array.

    Is there any othey efficient way of doing this?

    Thanks.

  7. #7
    Join Date
    Apr 1999
    Posts
    27,449

    Re: mutiple strings to handle ???

    Quote Originally Posted by ramancv
    Is there any othey efficient way of doing this?

    Thanks.
    To repeat what others have already stated, have you investigated using std::map or CMap?

    Regards,

    Paul McKenzie

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured