ios

标准库标头<ios>

此标头是输入/输出图书馆。

包括

*。

<iosfwd>

IOS[医]BASE管理格式化标志和输入/输出异常%28class%29

基本[医]IOS管理任意流缓冲区%28类模板%29

FPO表示流或文件%28类模板%29中的绝对位置。

井上[医]ERRC%28C++11%29 IO流错误码%28 enum%29

碘流[医]类别%28C++11%29标识碘流错误类别%28功能%29

是[医]误差[医]代码[医]enum<std::io[医]ERRC>%28C++11%29扩展类型性状std::is[医]误差[医]代码[医]标识iostream错误代码%28类模板%29

台培

流表示相对文件/流位置%28与FPO%29的偏移量,足以表示任何文件大小%28-胡枝子f%29

流大小表示在I/O操作中传输的字符数或I/O缓冲区%28-胡枝子f%29的大小

功能

制造[医]误差[医]代码%28std::io[医]erc%29%28C++11%29构造一个iostream错误代码%28函数%29

制造[医]误差[医]条件%28 std::io[医]ERRC%29%28C++11%29构造一个输入流错误[医]条件%28功能%29

boolalphanoboolalpha在booleans%28函数%29的文本和数字表示之间切换

showbasenoshowbase控制前缀是否用于表示数字基%28函数%29。

显示点控制小数点是否总是包含在浮点数表示形式%28函数%29中。

Disposnoshowpos控制非负数使用的+符号是否为%28函数%29。

在输入%28函数%29上是否跳过前导空格。

大写字母控制大写字符是否与某些输出格式一起使用%28函数%29

Unitbufnounitbuf控制每次操作后是否刷新输出%28功能%29

内左方设置填充字符的位置%28函数%29

改变整数I/O%28函数%29的基

修正科学的六浮动默认浮点数%28C+11%29%28C+11%29用于浮点I/O%28功能%29的格式更改

简介

二次

#include <iosfwd> namespace std { typedef /*implementation-defined*/ streamoff; typedef /*implementation-defined*/ streamsize; template <class stateT> class fpos; class ios_base; template <class charT, class traits = char_traits<charT> > class basic_ios; // manipulators: ios_base& boolalpha (ios_base& str ios_base& noboolalpha(ios_base& str ios_base& showbase (ios_base& str ios_base& noshowbase (ios_base& str ios_base& showpoint (ios_base& str ios_base& noshowpoint(ios_base& str ios_base& showpos (ios_base& str ios_base& noshowpos (ios_base& str ios_base& skipws (ios_base& str ios_base& noskipws (ios_base& str ios_base& uppercase (ios_base& str ios_base& nouppercase(ios_base& str ios_base& unitbuf (ios_base& str ios_base& nounitbuf (ios_base& str ios_base& internal (ios_base& str ios_base& left (ios_base& str ios_base& right (ios_base& str ios_base& dec (ios_base& str ios_base& hex (ios_base& str ios_base& oct (ios_base& str ios_base& fixed (ios_base& str ios_base& scientific (ios_base& str ios_base& hexfloat (ios_base& str ios_base& defaultfloat(ios_base& str enum class io_errc { stream = 1 }; template <> struct is_error_code_enum<io_errc> : public true_type { }; error_code make_error_code(io_errc e error_condition make_error_condition(io_errc e const error_category& iostream_category( }

二次

类std::ios_base

二次

class ios_base { public: class failure; // fmtflags typedef /*bitmask-type-1*/ fmtflags; static constexpr fmtflags boolalpha = /*unspecified*/; static constexpr fmtflags dec = /*unspecified*/; static constexpr fmtflags fixed = /*unspecified*/; static constexpr fmtflags hex = /*unspecified*/; static constexpr fmtflags internal = /*unspecified*/; static constexpr fmtflags left = /*unspecified*/; static constexpr fmtflags oct = /*unspecified*/; static constexpr fmtflags right = /*unspecified*/; static constexpr fmtflags scientific = /*unspecified*/; static constexpr fmtflags showbase = /*unspecified*/; static constexpr fmtflags showpoint = /*unspecified*/; static constexpr fmtflags showpos = /*unspecified*/; static constexpr fmtflags skipws = /*unspecified*/; static constexpr fmtflags unitbuf = /*unspecified*/; static constexpr fmtflags uppercase = /*unspecified*/; static constexpr fmtflags adjustfield = /*left|right|internal*/ ; static constexpr fmtflags basefield = /*dec|oct|hex*/ ; static constexpr fmtflags floatfield = /*scientific|fixed*/ ; // iostate typedef /*bitmask-type-2*/ iostate; static constexpr iostate badbit = /*unspecified*/; static constexpr iostate eofbit = /*unspecified*/; static constexpr iostate failbit = /*unspecified*/; static constexpr iostate goodbit = /*0*/ ; // openmode typedef /*bitmask-type-3*/ openmode; static constexpr openmode app = /*unspecified*/; static constexpr openmode ate = /*unspecified*/; static constexpr openmode binary = /*unspecified*/; static constexpr openmode in = /*unspecified*/; static constexpr openmode out = /*unspecified*/; static constexpr openmode trunc = /*unspecified*/; // seekdir typedef /*bitmask-type-4*/ seekdir; static constexpr seekdir beg = /*unspecified*/; static constexpr seekdir cur = /*unspecified*/; static constexpr seekdir end = /*unspecified*/; class Init; // fmtflags state: fmtflags flags() const; fmtflags flags(fmtflags fmtfl fmtflags setf(fmtflags fmtfl fmtflags setf(fmtflags fmtfl, fmtflags mask void unsetf(fmtflags mask streamsize precision() const; streamsize precision(streamsize prec streamsize width() const; streamsize width(streamsize wide // locales: locale imbue(const locale& loc locale getloc() const; // storage: static int xalloc( long& iword(int index void*& pword(int index // destructor virtual ~ios_base( // callbacks; enum event { erase_event, imbue_event, copyfmt_event }; typedef void (*event_callback)(event, ios_base&, int index void register_callback(event_callback fn, int index ios_base(const ios_base&) = delete; ios_base& operator=(const ios_base&) = delete; static bool sync_with_stdio(bool sync = true protected: ios_base( private: static int index; // exposition only long* iarray; // exposition only void** parray; // exposition only };

二次

类std::ios_base::failure

二次

class ios_base::failure : public system_error { public: explicit failure(const string& msg, const error_code& ec = io_errc::stream explicit failure(const char* msg, const error_code& ec = io_errc::stream };

二次

类std::ios_base::Init

二次

class ios_base::Init { public: Init( ~Init( private: static int init_cnt; // exposition only };

二次

类std::fpos

二次

template <class stateT> class fpos { public: stateT state() const; void state(stateT private; stateT st; // exposition only };

二次

类std::basic_ios

二次

template <class charT, class traits = char_traits<charT> > class basic_ios : public ios_base { public: // types: typedef charT char_type; typedef typename traits::int_type int_type; typedef typename traits::pos_type pos_type; typedef typename traits::off_type off_type; typedef traits traits_type; explicit operator bool() const; bool operator!() const; iostate rdstate() const; void clear(iostate state = goodbit void setstate(iostate state bool good() const; bool eof() const; bool fail() const; bool bad() const; iostate exceptions() const; void exceptions(iostate except // Constructor/destructor: explicit basic_ios(basic_streambuf<charT,traits>* sb virtual ~basic_ios( // Members: basic_ostream<charT,traits>* tie() const; basic_ostream<charT,traits>* tie(basic_ostream<charT,traits>* tiestr basic_streambuf<charT,traits>* rdbuf() const; basic_streambuf<charT,traits>* rdbuf(basic_streambuf<charT,traits>* sb basic_ios& copyfmt(const basic_ios& rhs char_type fill() const; char_type fill(char_type ch locale imbue(const locale& loc char narrow(char_type c, char dfault) const; char_type widen(char c) const; basic_ios(const basic_ios& ) = delete; basic_ios& operator=(const basic_ios&) = delete; protected: basic_ios( void init(basic_streambuf<charT,traits>* sb void move(basic_ios& rhs void move(basic_ios&& rhs void swap(basic_ios& rhs) noexcept; void set_rdbuf(basic_streambuf<charT, traits>* sb };

二次

© cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

http://en.cppreference.com/w/cpp/Header/IOS