Compiling...
StdAfx.cpp
E:\software\VC98\INCLUDE\tchar.h(425) : error C2007: #define syntax
E:\software\VC98\MFC\INCLUDE\afxdb.h(235) : error C2065: '__T' : undeclared identifier
E:\software\VC98\MFC\INCLUDE\afxdb.h(235) : error C2440: 'default argument' : cannot convert from 'int' to 'const char *'
        Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
Error executing cl.exe.train.exe - 3 error(s), 0 warning(s)

解决方案 »

  1.   

    // train.cpp : Defines the class behaviors for the application.
    //#include "stdafx.h"
    #include "train.h"
    #include "trainDlg.h"#ifdef _DEBUG
    #define new DEBUG_NEW
    #undef THIS_FILE
    static char THIS_FILE[] = __FILE__;
    #endif/////////////////////////////////////////////////////////////////////////////
    // CTrainAppBEGIN_MESSAGE_MAP(CTrainApp, CWinApp)
    //{{AFX_MSG_MAP(CTrainApp)
    // NOTE - the ClassWizard will add and remove mapping macros here.
    //    DO NOT EDIT what you see in these blocks of generated code!
    //}}AFX_MSG
    ON_COMMAND(ID_HELP, CWinApp::OnHelp)
    END_MESSAGE_MAP()/////////////////////////////////////////////////////////////////////////////
    // CTrainApp constructionCTrainApp::CTrainApp()
    {
    // TODO: add construction code here,
    // Place all significant initialization in InitInstance
    }/////////////////////////////////////////////////////////////////////////////
    // The one and only CTrainApp objectCTrainApp theApp;/////////////////////////////////////////////////////////////////////////////
    // CTrainApp initializationBOOL CTrainApp::InitInstance()
    {
    AfxEnableControlContainer(); // Standard initialization
    // If you are not using these features and wish to reduce the size
    //  of your final executable, you should remove from the following
    //  the specific initialization routines you do not need.#ifdef _AFXDLL
    Enable3dControls(); // Call this when using MFC in a shared DLL
    #else
    Enable3dControlsStatic(); // Call this when linking to MFC statically
    #endif CTrainDlg dlg;
    m_pMainWnd = &dlg;
    int nResponse = dlg.DoModal();
    if (nResponse == IDOK)
    {
    // TODO: Place code here to handle when the dialog is
    //  dismissed with OK
    }
    else if (nResponse == IDCANCEL)
    {
    // TODO: Place code here to handle when the dialog is
    //  dismissed with Cancel
    } // Since the dialog has been closed, return FALSE so that we exit the
    //  application, rather than start the application's message pump.
    return FALSE;
    }// train.h : main header file for the TRAIN application
    //#if !defined(AFX_TRAIN_H__558DCAD5_A0EE_4FC5_AC81_E61A8212B8B1__INCLUDED_)
    #define AFX_TRAIN_H__558DCAD5_A0EE_4FC5_AC81_E61A8212B8B1__INCLUDED_#if _MSC_VER > 1000
    #pragma once
    #endif // _MSC_VER > 1000#ifndef __AFXWIN_H__
    #error include 'stdafx.h' before including this file for PCH
    #endif#include "resource.h" // main symbols/////////////////////////////////////////////////////////////////////////////
    // CTrainApp:
    // See train.cpp for the implementation of this class
    //class CTrainApp : public CWinApp
    {
    public:
    CTrainApp();// Overrides
    // ClassWizard generated virtual function overrides
    //{{AFX_VIRTUAL(CTrainApp)
    public:
    virtual BOOL InitInstance();
    //}}AFX_VIRTUAL// Implementation //{{AFX_MSG(CTrainApp)
    // NOTE - the ClassWizard will add and remove member functions here.
    //    DO NOT EDIT what you see in these blocks of generated code !
    //}}AFX_MSG
    DECLARE_MESSAGE_MAP()
    };
    ///////////////////////////////////////////////////////////////////////////////{{AFX_INSERT_LOCATION}}
    // Microsoft Visual C++ will insert additional declarations immediately before the previous line.#endif // !defined(AFX_TRAIN_H__558DCAD5_A0EE_4FC5_AC81_E61A8212B8B1__INCLUDED_)
    // stdafx.h : include file for standard system include files,
    //  or project specific include files that are used frequently, but
    //      are changed infrequently
    //#if !defined(AFX_STDAFX_H__8A1061CC_DC6E_43D1_9374_9F94560B584C__INCLUDED_)
    #define AFX_STDAFX_H__8A1061CC_DC6E_43D1_9374_9F94560B584C__INCLUDED_#if _MSC_VER > 1000
    #pragma once
    #endif // _MSC_VER > 1000#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers#include <afxwin.h>         // MFC core and standard components
    #include <afxext.h>         // MFC extensions
    #include <afxdisp.h>        // MFC Automation classes
    #include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
    #ifndef _AFX_NO_AFXCMN_SUPPORT
    #include <afxcmn.h> // MFC support for Windows Common Controls
    #include<afxdb.h>
    #endif // _AFX_NO_AFXCMN_SUPPORT
    //{{AFX_INSERT_LOCATION}}
    // Microsoft Visual C++ will insert additional declarations immediately before the previous line.#endif // !defined(AFX_STDAFX_H__8A1061CC_DC6E_43D1_9374_9F94560B584C__INCLUDED_)
      

  2.   

    我觉得好像是#include<afxdb.h>有问题,但是不知道怎么改,也找不错是什么错误