I have recently been trying to develope a chat application.I want to use dynamic allocation with linked list for my sockets so that the user can modify the max user limit at any time.Now the problem is that the CSocket::Receive dosent seem to work with the pointer.My code is something like this..
CMysocket m_listenSocket;//the listening socket
CMySocket * temp;//the socket pointer
//In the accept or the connect functions
temp = new CMySocket;
Now the program compiles and executes without error.It also connects and accepts connections flawlessly.It also sends data without an error.However whten i call the onreceive the Receive function call fails and the program crashes.I cant understand as to what i might be doing wrong.Please help...