hi all,
i'm getting Invalid pointer error on the select statement on socket Programming.
here is the code
while(1)
{
readme();
}
readme()
{
struct timeval strTimeout;
strTimeout.tv_sec = 15;
strTimeout.tv_usec = 0;
fd_set m_fpFDS;
FD_ZERO(&m_fpFDS);
FD_SET(m_iServerSockDesc, &m_fpFDS);
int mReturnCode = select(m_iServerSockDesc+1 , &m_fpFDS, (fd_set*)NULL,(fd_set*)NULL, &strTimeout);
}
can any one tell me who the memory to select and its arugument is get cleared?
and why the memory leak is happening?
thanks in advance
Your code looks ok to me.
Is m_iServerSockDesc
initialised correctly?
yes i've initialised it properly..
Can you post a minimal complete example that reproduces the problem?