Всем привет!
Недавно у меня возникла следующая проблема в C++, компилятор ругается на строчки:
BOOL CserverDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
// TODO: Add extra initialization here
m_pListenSocket.SetParentDlg(this); //ругается вот сюда...
m_pConnectSocket.SetParentDlg(this); // ...и сюда
m_pListenSocket.Create(2000); //Создаем сокет на 2000 порту
return TRUE; // return TRUE unless you set the focus to a control
}
|
Как ругантся:
error C2664: 'CMySocket::SetParentDlg' : cannot convert parameter 1 from 'CserverDlg *const ' to 'CMySocket::CServerDlg *'
|
и
error C2664: 'CMySocket::SetParentDlg' : cannot convert parameter 1 from 'CserverDlg *const ' to 'CMySocket::CServerDlg *'
|
Помогите подправить код!
Если надо могу выложить весь проект (пользуюсь Visual Studio 2005)
Взарание спасибо!