.


:




:

































 

 

 

 


ios, istream, ostream




− , ios, istream, ostream . ios - basic_ios, ios_base.

template <class E, class T = char_traits<E> >

class basic_ios: public ios_base

{public:

iostate rdstate() const; //

void clear(iostate state = goodbit); //

// .

// : cin.clear(ios::eofbit)

void setstate(iostate state);

bool good() const; // true-

bool eof() const; // true , .. -

// −

bool fail() const; // true

bool bad() const; // true

basic_ostream<E, T> *tie() const;

basic_ostream<E, T> *tie(basic_ostream<E, T> *str);

basic_streambuf<E, T> *rdbuf() const; //

// −

basic_streambuf<E, T> *rdbuf(basic_streambuf<E, T> *sb);

basic_ios& copyfmt(const basic_ios& rhs);

locale imbue(const locale& loc);

E widen(char ch);

char narrow(E ch, char dflt);

protected:

basic_ios();

void init(basic_streambuf<E, T>* sb);

};

istream ostream.

template <class E, class T = char_traits<E> >

class basic_istream: virtual public basic_ios<E, T>

{public:

bool ipfx(bool noskip = false);

void isfx();

streamsize gcount() const;

int_type get();

basic_istream& get(E& c);

basic_istream& get(E *s, streamsize n);

basic_istream& get(E *s, streamsize n, E delim);

basic_istream& get(basic_streambuf<E, T> *sb);

basic_istream& get(basic_streambuf<E, T> *sb, E delim);

basic_istream& getline(E *s, streamsize n)E

basic_istream& getline(E *s, streamsize n, E delim);

basic_istream& ignore(streamsize n = 1, // n

int_type delim = T::eof()); //

//

// − EOF

int_type peek(); // ,

basic_istream& read(E *s, streamsize n); //

streamsize readsome(E *s, streamsize n);

basic_istream& putback(E c);//

// , get

basic_istream& unget();

pos_type tellg();

basic_istream& seekg(pos_type pos);

basic_istream& seekg(off_type off, ios_base::seek_dir way);

int sync();

};

template <class E, class T = char_traits<E> >

class basic_ostream: virtual public basic_ios<E, T>

{public:

bool opfx();

void osfx();

basic_ostream& put(E c);

basic_ostream& write(E *s, streamsize n); //

basic_ostream& flush();

pos_type tellp();

basic_ostream& seekp(pos_type pos);

basic_ostream& seekp(off_type off, ios_base::seek_dir way);

};

 

8. ++

, , , .. . ++ . , , , .

++. :

- ;

- ;

- ;

- goto setjmp/longjmp;

- assert.

. . -, . , . () , . . , -, , .

, - . , .

, , goto . setjmp/longjmp , : , , , .

, , assert , , .

, , - . .

 





:


: 2015-09-20; !; : 1464 |


:

:

.
==> ...

1376 - | 1218 -


© 2015-2024 lektsii.org - -

: 0.013 .