Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,
I have this class:
C#
#pragma once

class CSeverSocket : public CSocket
{
public:
    CSeverSocket(void);
public:
    ~CSeverSocket(void);

public:
    virtual void OnAccept(int nErrorNumber);
public:
    CSeverSocket m_Client;

};

when i make an object from this in another class header file like:
CSS
public:
    CSeverSocket m_Server;

i have this Error:
error C2146: syntax error : missing ';' before identifier 'm_Server'
please help me,Thnx
Posted

1 solution

You need to include the header which defines the CSeverSocket class.
 
Share this answer
 
Comments
Hanoi 2014 6-Oct-13 7:14am    
Yes, Thanks a lot.
Hanoi 2014 6-Oct-13 8:39am    
No, this problem appears again
Richard MacCutchan 6-Oct-13 10:59am    
Right, and you think perhaps we can guess why?
Hanoi 2014 7-Oct-13 1:56am    
sorry,
Richard MacCutchan 7-Oct-13 2:48am    
Did you consider actually showing the code and identifying the line that is giving the error?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900