stdstrng.h

来自「ALGAE是一个快速创建算法演示的框架。目前支持的算法实现语言包括java和c」· C头文件 代码 · 共 46 行

H
46
字号
#ifndef STDSTRING_H
#define STDSTRING_H

// #include the local approximation to the std::string class.

#if defined(__TCPLUSPLUS__)

// Although Borland TC 4.5 provides a reasonable approximation to
//   std::string in cstring.h, the cstring.h file compiles only
//   with STRICT defined.  Unfortunately, this alters the declaration
//   of several windows types, including HWND, HPEN, etc.  The V library
//   does not compile with the STRICT version of the windows handle types.
//
// So instead of using Borland's cstring.h, I use my own implementation of
//   std::string.
//
// A further complicating factor. If you declare you own class named string,
// something in the Turbo C++ library uses it before main is invoked and
// before many statics have been initialized, sometimes leading to crashes.
// So, I redefine string to give the class a different underlying name.

#define NO_REVERSE_ITERATORS
#include <algae/config.h>
#define string stdstring
#include <utils/string.h>

#elif defined(__BCPLUSPLUS__)

#include <cstring.h>

#elif defined(__GNUG__)

#define NO_REVERSE_ITERATORS
#define string stdstring
#include <utils/string.h>

#elif defined(_MSC_VER)

#define NO_REVERSE_ITERATORS
#define string stdstring
#include <utils/string.h>

#endif

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?