I'm using the tcp::iostream from boost to send a message to a server, but i'm getting a weird issue where my program sends out a memory address instead of the string that I actually want to send. For example, if I output "test string", what my program actually sends out is something like "4EB6A4".
However, this only happens if I access the tcp::iostream's << operator through a pointer. The following works fine...
Due to the syntax of the way you're calling it: conn->operator << must call a member function.
*conn << , on the other hand, can call a member function or a global operator overload depending on whichever is the closest match for the given parameters.
Here, the << operator you want is probably a global function and not a member function. So using conn->operator << syntax can't find the right overload.