Ok so i wrote a c++ websocket server took a while but i think i did good job for a intermediate programmer but have a question my friend suggested that i use hash_map from the namespace __gnu_cxx; it all builds fine and what not i just want to know say i need to change a users name in one of the user fields would it update just by doing this
_userslist[id].name = “BlaBla Bla”;
or would i need to replace the entire field with a copy but with name changed.
i would try it but when ever i take the server down all my members moan and moan so thought id ask here 🙂
Thanks
Dave
Most likely
_userslist[id]will return aWinUser&, assuming_userslistis not const in this context. Ifnameis a public member ofWinUserthat has anoperator=that takes aconst char *(or somethingconst char *can convert into), then it will work.