POla
March 10th, 2008, 07:14 AM
original error:
error C3867: 'ServerChat::Form1::OnClientConnect': function call missing argument list; use '&ServerChat::Form1::OnClientConnect' to create a pointer to member
the function is like this void OnClientConnect( IAsyncResult^ ar){};
By doing AsyncCallback(&Form1::OnClientConnect) the error seem like solved but an error happen like this:
error C3352: 'void ServerChat::Form1::OnClientConnect(System::IAsyncResult ^)' : the specified function does not match the delegate type 'void (System::IAsyncResult ^)'
-it look exactly same type but came out an error.
then i try put static void OnClientConnect( IAsyncResult^ ar) and the error gone seem to be solved but the static cause some new error like this:
error C2227: left of '->Text' must point to class/struct/union/generic type
-richTextBoxRcvMsg->Text by right should be no problem.
error C2227: left of '->EndAccept' must point to class/struct/union/generic type
-m_Socket->EndAccept(ar) by right should be no problem.
Can somebody help to explain what is happening and come out a solution to this pls? It is important to me, thanks.
error C3867: 'ServerChat::Form1::OnClientConnect': function call missing argument list; use '&ServerChat::Form1::OnClientConnect' to create a pointer to member
the function is like this void OnClientConnect( IAsyncResult^ ar){};
By doing AsyncCallback(&Form1::OnClientConnect) the error seem like solved but an error happen like this:
error C3352: 'void ServerChat::Form1::OnClientConnect(System::IAsyncResult ^)' : the specified function does not match the delegate type 'void (System::IAsyncResult ^)'
-it look exactly same type but came out an error.
then i try put static void OnClientConnect( IAsyncResult^ ar) and the error gone seem to be solved but the static cause some new error like this:
error C2227: left of '->Text' must point to class/struct/union/generic type
-richTextBoxRcvMsg->Text by right should be no problem.
error C2227: left of '->EndAccept' must point to class/struct/union/generic type
-m_Socket->EndAccept(ar) by right should be no problem.
Can somebody help to explain what is happening and come out a solution to this pls? It is important to me, thanks.