CData.cpp
#include "CData.h"
#include "stdafx.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
IMPLEMENT_SERIAL(CSocketData,CObject,1)//主要是这句,去掉没有多少错误了void CSocketData::Serialize(CArchive& ar)
{
    CObject::Serialize(ar); if(ar.IsStoring())
ar<<n;
else 
ar>>n;
  }
////////////////////////////////////////////////////////
//CData.h
class CSocketData :public CObject
{
protected:
DECLARE_SERIAL(CSocketData)
CData():
public:
int nSreen[18][10];
    int n;
public: void Serialize(CArchive& ar);};
//errors
C:\VC++程序\网络简单通信\CData.cpp(12) : error C2653: 'CSocketData' : is not a class or namespace name
C:\VC++程序\网络简单通信\CData.cpp(12) : error C2061: syntax error : identifier 'CSocketData'
C:\VC++程序\网络简单通信\CData.cpp(12) : error C2143: syntax error : missing ';' before '}'
C:\VC++程序\网络简单通信\CData.cpp(12) : error C2143: syntax error : missing ';' before '}'都是这样的错误,搞不懂,看不出有错,请大家帮帮忙