View Single Post
  #1 (permalink)  
Old August 19th, 2002
Kaom
Guest
 
Posts: n/a
Question Question on Gnucleus sockets, STL

Why does Gnucleus use in class CGnuControl
std::vector<CGnuNode*> m_NodeList; instead of
std::list<CGnuNode*> m_NodeList; ?

Wouldn't a std::list behave more efficient when deleting random socket objects? AFAIK the server has insertion always to end, the deletion is at random positions, access is serially. A std::list fits better? *asking*

2nd question, in class CChatRoom should't
std::vector<CString> m_UserList; be a
std::map<CString, int> m_UserList; (or similar)?

An implementation of CChatRoom::FindUser() could then be more simple?

Thanks for feedback.
Reply With Quote