/***
*stdiostr.h - definitions/declarations for stdiobuf, stdiostream
*
* Copyright (c) 1991-1997, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file defines the classes, values, macros, and functions
* used by the stdiostream and stdiobuf classes.
* [AT&T C++]
*
* [Public]
*
****/
#if _MSC_VER > 1000
#pragma once
#endif
#ifdef __cplusplus
#ifndef _INC_STDIOSTREAM
#define _INC_STDIOSTREAM
#if !defined(_WIN32) && !defined(_MAC)
#error ERROR: Only Mac or Win32 targets supported!
#endif
#ifdef _MSC_VER
// Currently, all MS C compilers for Win32 platforms default to 8 byte
// alignment.
#pragma pack(push,8)
#include <useoldio.h>
#endif // _MSC_VER
/* Define _CRTIMP */
#ifndef _CRTIMP
/* current definition */
#ifdef _DLL
#define _CRTIMP __declspec(dllimport)
#else /* ndef _DLL */
#define _CRTIMP
#endif /* _DLL */
#endif /* _CRTIMP */
#include <iostream.h>
#include <stdio.h>
#ifdef _MSC_VER
#pragma warning(disable:4514) // disable unwanted /W4 warning
// #pragma warning(default:4514) // use this to reenable, if necessary
#endif // _MSC_VER
class _CRTIMP stdiobuf : public streambuf {
public:
stdiobuf(FILE* f);
FILE * stdiofile() { return _str; }
virtual int pbackfail(int c);
virtual int overflow(int c = EOF);
virtual int underflow();
virtual streampos seekoff( streamoff, ios::seek_dir, int =ios::in|ios::out);
virtual int sync();
~stdiobuf();
int setrwbuf(int _rsize, int _wsize);
// protected:
// virtual int doallocate();
private:
FILE * _str;
};
// obsolescent
class _CRTIMP stdiostream : public iostream { // note: spec.'d as : public IOS...
public:
stdiostream(FILE *);
~stdiostream();
stdiobuf* rdbuf() const { return (stdiobuf*) ostream::rdbuf(); }
private:
};
#ifdef _MSC_VER
// Restore default packing
#pragma pack(pop)
#endif // _MSC_VER
#endif // _INC_STDIOSTREAM
#endif /* __cplusplus */
荣华富贵8
- 粉丝: 218
- 资源: 7653
最新资源
- 20241226_243237026.jpeg
- f81f7b71ce9eb640ab3b0707aaf789f2.PNG
- YOLOv10目标检测基础教程:从零开始构建你的检测系统
- 学生实验:计算机编程基础教程
- 软件安装与配置基础教程:从新手到高手
- IT类课程习题解析与实践基础教程
- 湖南大学大一各种代码:实验1-9,小班,作业1-10,开放题库 注:这是21级的,有问题不要找我,少了也不要找我
- 湖南大学大一计科小学期的练习题 注,有问题别找我
- unidbg一、符号调用、地址调用
- forest-http
- christmas-圣诞树代码
- platform-绿色创新理论与实践
- christmas-圣诞树
- 数据分析-泰坦尼克号幸存者预测
- 字符串-圣诞树c语言编程代码
- learning_coder-二叉树的深度
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈