CARVIEW |
Select Language
HTTP/1.1 200 OK
Server: nginx
Date: Wed, 23 Jul 2025 05:53:02 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
ETag: W/"9850-6f8VktiPb087w/jf4/CF1GwyzRw"
Content-Encoding: gzip
Base class for the entire hierarchy of stream classes in the standard input/output library, describing the most basic part of a stream which is common to all stream objects, independently of their character type.
It has no public constructors, and thus no objects of this class can be declared.
Both ios_base and its derived class 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.
More specifically, the ios_base class maintains the following information of a stream:
Formatting:
Locales:
Internal extensible array:
Others:
Reference
C library:
- <cassert> (assert.h)
- <cctype> (ctype.h)
- <cerrno> (errno.h)
-
<cfenv> (fenv.h)C++11
- <cfloat> (float.h)
-
<cinttypes> (inttypes.h)C++11
- <ciso646> (iso646.h)
- <climits> (limits.h)
- <clocale> (locale.h)
- <cmath> (math.h)
- <csetjmp> (setjmp.h)
- <csignal> (signal.h)
- <cstdarg> (stdarg.h)
-
<cstdbool> (stdbool.h)C++11
- <cstddef> (stddef.h)
-
<cstdint> (stdint.h)C++11
- <cstdio> (stdio.h)
- <cstdlib> (stdlib.h)
- <cstring> (string.h)
-
<ctgmath> (tgmath.h)C++11
- <ctime> (time.h)
-
<cuchar> (uchar.h)C++11
- <cwchar> (wchar.h)
- <cwctype> (wctype.h)
Containers:
-
<array>C++11
- <deque>
-
<forward_list>C++11
- <list>
- <map>
- <queue>
- <set>
- <stack>
-
<unordered_map>C++11
-
<unordered_set>C++11
- <vector>
-
Input/Output:
Multi-threading:
-
<atomic>C++11
-
<condition_variable>C++11
-
<future>C++11
-
<mutex>C++11
-
<thread>C++11
-
Other:
- <algorithm>
- <bitset>
-
<chrono>C++11
-
<codecvt>C++11
- <complex>
- <exception>
- <functional>
-
<initializer_list>C++11
- <iterator>
- <limits>
- <locale>
- <memory>
- <new>
- <numeric>
-
<random>C++11
-
<ratio>C++11
-
<regex>C++11
- <stdexcept>
- <string>
-
<system_error>C++11
-
<tuple>C++11
-
<type_traits>C++11
-
<typeindex>C++11
- <typeinfo>
- <utility>
- <valarray>
<ios>
types
manipulators
other functions
-
iostream_categoryC++11
-
ios_base
- ios_base::~ios_base
- ios_base::ios_base
member functions
member types
class
<ios> <iostream>
std::ios_base
class ios_base;
Base class for streams
- ios_base
- basic_ios
Base class for the entire hierarchy of stream classes in the standard input/output library, describing the most basic part of a stream which is common to all stream objects, independently of their character type.
It has no public constructors, and thus no objects of this class can be declared.
Both ios_base and its derived class 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.
More specifically, the ios_base class maintains the following information of a stream:
field | member functions | description | |
---|---|---|---|
Formatting | format flags | flags setf unsetf | A set of internal flags that affect how certain input/output operations are interpreted or generated. See member type fmtflags. |
field width | width | Width of the next formatted element to insert. | |
display precision | precision | Decimal precision for the next floating-point value inserted. | |
locale | getloc imbue | The locale object used by the function for formatted input/output operations affected by localization properties. | |
Other | callback stack | register_callback | Stack of pointers to functions that are called when certain events occur. |
extensible arrays | iword pword xalloc | Internal arrays to store objects of type long and void* . |
Member Functions
- (constructor)
- Construct object (public member function)
- (destructor)
- Destruct object (public member function)
Formatting:
- flags
- Get/set format flags (public member function)
- setf
- Set specific format flags (public member function)
- unsetf
- Clear specific format flags (public member function)
- precision
- Get/Set floating-point decimal precision (public member function)
- width
- Get/set field width (public member function)
Locales:
- imbue
- Imbue locale (public member function)
- getloc
- Get current locale (public member function)
Internal extensible array:
- xalloc
- Get new index for extensible array [static] (public static member function)
- iword
- Get integer element of extensible array (public member function)
- pword
- Get pointer element of extensible array (public member function)
Others:
- register_callback
- Register event callback function (public member function)
- sync_with_stdio
- Toggle synchronization with cstdio streams [static] (public static member function)
Member types
- event
- Type to indicate event type (public member type)
- event_callback
- Event callback function type (public member type)
- fmtflags
- Type for stream format flags (public member type)
- iostate
- Type for stream state flags (public member type)
- openmode
- Type for stream opening mode flags (public member type)
- seekdir
- Type for stream seeking direction flag (public member type)
Member classes
- failure
- Base class for stream exceptions (public member class)
- Init
- Initialize standard stream objects (public member class)
Member constants
Streams have member constants with the possible values for member types fmtflags, iostate, openmode and seekdir (see the description of each type for more info).
Home page | Privacy policy
© cplusplus.com, 2000-2025 - All rights reserved - v3.3.4s
Spotted an error? contact us
© cplusplus.com, 2000-2025 - All rights reserved - v3.3.4s
Spotted an error? contact us