
- C++ Library - Home
- C++ Library - <fstream>
- C++ Library - <iomanip>
- C++ Library - <ios>
- C++ Library - <iosfwd>
- C++ Library - <iostream>
- C++ Library - <istream>
- C++ Library - <ostream>
- C++ Library - <sstream>
- C++ Library - <streambuf>
- C++ Library - <atomic>
- C++ Library - <complex>
- C++ Library - <exception>
- C++ Library - <functional>
- C++ Library - <limits>
- C++ Library - <locale>
- C++ Library - <memory>
- C++ Library - <new>
- C++ Library - <numeric>
- C++ Library - <regex>
- C++ Library - <stdexcept>
- C++ Library - <string>
- C++ Library - <thread>
- C++ Library - <tuple>
- C++ Library - <typeinfo>
- C++ Library - <utility>
- C++ Library - <valarray>
- The C++ STL Library
- C++ Library - <array>
- C++ Library - <bitset>
- C++ Library - <deque>
- C++ Library - <forward_list>
- C++ Library - <list>
- C++ Library - <map>
- C++ Library - <multimap>
- C++ Library - <queue>
- C++ Library - <priority_queue>
- C++ Library - <set>
- C++ Library - <stack>
- C++ Library - <unordered_map>
- C++ Library - <unordered_set>
- C++ Library - <vector>
- C++ Library - <algorithm>
- C++ Library - <iterator>
- The C++ Advanced Library
- C++ Library - <any>
- C++ Library - <barrier>
- C++ Library - <bit>
- C++ Library - <chrono>
- C++ Library - <cinttypes>
- C++ Library - <clocale>
- C++ Library - <condition_variable>
- C++ Library - <coroutine>
- C++ Library - <cstdlib>
- C++ Library - <cstring>
- C++ Library - <cuchar>
- C++ Library - <charconv>
- C++ Library - <cfenv>
- C++ Library - <cmath>
- C++ Library - <ccomplex>
- C++ Library - <expected>
- C++ Library - <format>
- C++ Library - <future>
- C++ Library - <flat_set>
- C++ Library - <flat_map>
- C++ Library - <filesystem>
- C++ Library - <generator>
- C++ Library - <initializer_list>
- C++ Library - <latch>
- C++ Library - <memory_resource>
- C++ Library - <mutex>
- C++ Library - <mdspan>
- C++ Library - <optional>
- C++ Library - <print>
- C++ Library - <ratio>
- C++ Library - <scoped_allocator>
- C++ Library - <semaphore>
- C++ Library - <source_location>
- C++ Library - <span>
- C++ Library - <spanstream>
- C++ Library - <stacktrace>
- C++ Library - <stop_token>
- C++ Library - <syncstream>
- C++ Library - <system_error>
- C++ Library - <string_view>
- C++ Library - <stdatomic>
- C++ Library - <variant>
- C++ STL Library Cheat Sheet
- C++ STL - Cheat Sheet
- C++ Programming Resources
- C++ Programming Tutorial
- C++ Useful Resources
- C++ Discussion
C++ Library - <basic_ios>
Introduction
Basic_ios define the components of streams that do not depend on whether the stream is an input or an output stream: ios_base describes the members that are independent of the template parameters (i.e. the character type and traits), while basic_ios describes the members that do depend on them.
Definition
Below is definition of basic_ios as shown below −
template <class charT, class traits = char_traits<charT> > class ios_base;
Parameters
Parameters of basic_ios should be like this −
parameters − Character type.
traits − Character traits class that defines essential properties of the characters used by stream objects (see char_traits).
Member types
Sr.No. | Member types | Definition |
---|---|---|
1 | event | Type to indicate event type |
2 | event_callback | Event callback function type |
3 | failure | Base class for stream exceptions |
4 | fmtflags | Type for stream format flags |
5 | Init | Initialize standard stream objects |
6 | iostate | Type for stream state flags |
7 | openmode | Type for stream opening mode flags |
8 | seekdir | Type for stream seeking direction flag |
Public Member Functions
Sr.No. | Member types | Definition |
---|---|---|
1 | (constructor) | Construct object (public member function ) |
2 | (destructor) | Destruct object (public member function ) |
State flag functions
Sr.No. | Member types | Definition |
---|---|---|
1 | good | It is used to check whether state of stream is good |
2 | eof | It is used to check whether eofbit is set |
3 | fail | It is used to check whether either failbit or badbit is set |
4 | bad | It is used to check whether badbit is set |
5 | operator! | Evaluate stream |
6 | rdstate | It is used to get error state flags |
7 | setstate | It is used to set error state flag |
8 | clear | It is used to set error state flag |
Formatting
Others
Sr.No. | Member types | Definition |
---|---|---|
1 | exceptions | It is used to get/set exceptions mask |
2 | imbue | Imbue locale |
3 | tie | It is used to get/set tied stream |
4 | rdbuf | It is used to get/set stream buffer |
5 | narrow | Narrow character |
6 | widen | Widen character |
Protected member functions
Sr.No. | Member types | Definition |
---|---|---|
1 | init | Initialize object |
2 | move | Move internals |
3 | swap | Swap internals |
4 | set_rdbuf | It is used to set stream buffer |
ios.htm
Advertisements