编译报错!

lengyu_984 2005-06-24 09:31:36
这是_stddef.h里的内容

/* _stddef.h

multi-includable Definitions for common types, and NULL

*/

/*
* C/C++ Run Time Library - Version 9.5
*
* Copyright (c) 1987, 1999 by Inprise Corporation
* All Rights Reserved.
*
*/

/* $Revision: 9.1 $ */

#ifndef ___STDDEF_H
#define ___STDDEF_H

#if !defined(___DEFS_H)
#include <_defs.h>
#endif

#ifndef NULL
#include <_null.h>
#endif

#ifdef __cplusplus
namespace std{
#endif /* __cplusplus */

/* Define __STD to expand to std:: or nothing depending on being in C++. */
#ifdef __cplusplus
# define __STD std::
#else
# define __STD
#endif

/*
Define the size_t type in the std namespace if in C++ or globally if in C.
If we're in C++, make the _SIZE_T macro expand to std::size_t
*/

#if !defined(_SIZE_T) && !defined(_SIZE_T_DEFINED)
# define _SIZE_T_DEFINED
typedef unsigned int size_t;
# if defined(__cplusplus)
# define _SIZE_T std::size_t
# else
# define _SIZE_T size_t
# endif
#endif


#if !defined(RC_INVOKED)

#if defined(__STDC__)
#pragma warn -nak
#endif

#endif /* !RC_INVOKED */

#ifndef _PTRDIFF_T
#define _PTRDIFF_T
typedef int ptrdiff_t;
#endif


#define offsetof( s_name, m_name ) (_SIZE_T)&(((s_name _FAR *)0)->m_name)

#ifndef __cplusplus
#if !defined(_WCHAR_T) && !defined(_WCHAR_T_DEFINED)
#define _WCHAR_T
#define _WCHAR_T_DEFINED /* For WINDOWS.H */
typedef unsigned short wchar_t;
#endif
#endif

/*
Define the wint_t type in the std namespace if in C++ or globally if in C.
If we're in C++, make the _WINT_T macro expand to std::wint_t
*/

#if !defined(_WINT_T)
typedef wchar_t wint_t;
# ifdef __cplusplus
# define _WINT_T std::wint_t
# else
# define _WINT_T wint_t
# endif
#endif

#ifndef _WCTYPE_T_DEFINED
typedef wchar_t wctype_t;
#define _WCTYPE_T_DEFINED
#endif

#ifdef __cplusplus
extern "C" {
#endif
extern unsigned long _RTLENTRY _EXPFUNC __threadid(void);
#define _threadid (__threadid())

#ifdef __cplusplus
}
#endif

#if !defined(RC_INVOKED)

#if defined(__STDC__)
#pragma warn .nak
#endif

#endif /* !RC_INVOKED */

#ifdef __cplusplus
} //std
#endif /* __cplusplus */

#endif /* __STDDEF_H */

#if defined(__cplusplus) && !defined(__USING_CNAME__) && !defined(___STDDEF_H_USING_LIST)
#define ___STDDEF_H_USING_LIST
using std::ptrdiff_t;
using std::__threadid;
using std::size_t;
using std::wint_t;
using std::wctype_t;
#endif /* __USING_CNAME__ */

报的第一个错是declaration syntax error
报的第一个错是qualifier 'std' is not a class or namespace name
这是怎么回事呀,_stddef.h里的内容是干什么用的
...全文
67 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

13,825

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder相关内容讨论区
社区管理员
  • 基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧