Quick STD::List Search (C++)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ajm113
    New Member
    • Jun 2007
    • 161

    #1

    Quick STD::List Search (C++)

    I am using a struct for the list and I want too avoid using a while loop for the search, because my render function is in a while loop. So adding while loops on render function the search will cause a non responsive game. I am working on font system where I can call a function like so:

    Say(int ID, X, Y, MSG)

    where if I call that function more then once all it will do is update the current message of that ID.

    Can someone help me out finding the ID number in a list?

    Thanks, Andrew.
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    Here's where you start learning multithreading. Put your search on a worker thread and come back later to pick up the results. Meanwhile you can service your player.

    Comment

    Working...