Are there any simple, effective answers to this?... aside from, "Decide which is more important", that is.
Let me elaborate. I want a fixed size array. It represents session slots that can be opened for a socket server to accept clients. There are a limited number of these (four, at present).
Perhaps from a C++ perspective my question is all wrong. Perhaps I should be considering these as session slots which, while filled with session objects, may not necessarily be usable until a given session has a reference to a connected TCP socket. This differs from most dynamic languages where I could simply specify the session slots as null until such time as a session fills that slot in the array.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…