In Windows Sockets the following used to work fine. How can I achieve the same in Csocket class of MFC? Just replacing SOCKET with CSocket gives error on line 3 when compiled.
static SOCKET sArray[100];
SOCKET s;
sArray[count]=s;
Error:
error C2248: 'CSocket::operator =': cannot access private member declared in class 'CSocket'
You are not allowed to copy a CSocket object. That's all what the message tells you. If you have an array, use the object in the array position count.