I don't think too many people are interested in scanning through - or
testing - your code.
However, I do not like your type-casting.
Don't do delete on a void pointer. Perform the delete on the actual data
type, or on a base type (if the destructor is declared as virtual). How
else will the compiler know what destructor to run? A void pointer do not
have any virtual method table or any secret data to perform RTTI.
/pwm
On Sun, 29 Jun 2008, Ben Melikant wrote:
> Hello all. I recently wrote a server, but was asked to rewrite it using
> std::string. The code is in the files. Can anyone please spot my error?
> The server keeps crashing when it gets a connection from a client. Any
> errors spotted would be a help to me!
>
>
>
|