bnhshallow
Programmer
Ive had the VC++ Standard for 2 days now and im workin on these sockets. the compliler says that there are two errors in the following code...
void MySocket::SetParent(CDialog *pWnd)
{
m_pWnd = pWnd;
}
void MySocket::OnAccept(int nErrorCode)
{
if (nErrorCode == 0)
((CSockDlg *)m_pWnd)->OnAccept(); //This the one with the
//Errors
}
void MySocket::OnConnect(int nErrorCode)
{
}
void MySocket::OnClose(int nErrorCode)
{
}
void MySocket::OnReceive(int nErrorCode)
{
}
void MySocket::OnSend(int nErrorCode)
{
}
The Errors are:
error C2065: 'CSockDlg' : undeclared identifier
error C2059: syntax error : ')'
Also, the "OnClose" function (i think) is wrong because i forgot to check the "Virtual" Box when creating it. Is there anyway do completly delete a function like that??
void MySocket::SetParent(CDialog *pWnd)
{
m_pWnd = pWnd;
}
void MySocket::OnAccept(int nErrorCode)
{
if (nErrorCode == 0)
((CSockDlg *)m_pWnd)->OnAccept(); //This the one with the
//Errors
}
void MySocket::OnConnect(int nErrorCode)
{
}
void MySocket::OnClose(int nErrorCode)
{
}
void MySocket::OnReceive(int nErrorCode)
{
}
void MySocket::OnSend(int nErrorCode)
{
}
The Errors are:
error C2065: 'CSockDlg' : undeclared identifier
error C2059: syntax error : ')'
Also, the "OnClose" function (i think) is wrong because i forgot to check the "Virtual" Box when creating it. Is there anyway do completly delete a function like that??