# pragma once
# include "clientdlg. H"
Then defined in CClientDlg CClientSocket m_SockClient; This header file is automatically generated
# pragma once
# include "clientsocket. H"
Problem: compile time is always wrong, hint 1 & gt; C: \ users \ cc \ documents \ visual studio 2010 \ projects \ client \ client \ clientdlg h (43) : error C2146: syntax errors: lack of ";" (in front of the identifier "m_SockClient"), such as error, this is how to return a responsibility? Please advise, I am a novice, just contact,
CodePudding user response:
Error messages in the prompt your statement without;CodePudding user response:
Run into a similar problem is done with/*... every time." */comment out different parts to recompile again, until orientation to the location of the specific grammatical errors, "
The methods to solve of,
CodePudding user response:
Not less; This should be a circular containing errors, because I comment a turn file contains statements, and then delete this command, mistake, now the problem is repeated contains how to avoidCodePudding user response:
Why so containing, a little dizzy;You are nothing but want to use the main window handle, or pointer, you can go in through the function;
DLG. H:
The class cclientsocket;
The class CDLG
{
Cclientsocket * pClientSocket;
}
DLG. CPP
The oninit () initialization function
{
PClientSocket=new cclientsocket;
PClientSocket. SetHwnd (this); Or pClientSocket. SetHwnd (getsafehwnd ());
}
Cclientsocket. H
Void * pFather or HWND hFahter;
Include DLG. "h"
Cclientsocket. CPP