home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional Developers Kit 1992 November / Disc01 / Disc01.mdf / cppbeta / help / dde4bcl.in_ / DDE4BCL.INF (.txt)
Encoding:
OS/2 Help File  |  1992-10-28  |  305.5 KB  |  152,488 lines

Text Truncated. Only the first 1MB is shown below. Download the file for the complete contents.
  1.  
  2. ΓòÉΓòÉΓòÉ 1. Chapter 1. Introduction ΓòÉΓòÉΓòÉ
  3.  
  4. This book describes the basic class libraries included with the &IBMcxxcomp. 
  5. These class libraries provide sets of predefined classes that you can use to 
  6. perform common functions such as input and output or complex arithmetic. 
  7.  
  8. The following information is contained in this chapter: 
  9.  
  10. o What are the class libraries? 
  11. o Who should use this book 
  12. o How to use this book 
  13. o A note about examples 
  14. o Related documentation 
  15.  
  16. You can also go back to the table of contents. 
  17.  
  18.  
  19. ΓòÉΓòÉΓòÉ 1.1. What Class Libraries Are Described in this Book? ΓòÉΓòÉΓòÉ
  20.  
  21. A C++ class library is a collection of related classes and functions. This book 
  22. describes these three basic class libraries: 
  23.  
  24. o The Complex Mathematics Library 
  25. o The I/O Stream Library 
  26. o The Task Library. 
  27.  
  28. See Chapter 2, -- Reference h000175 not found -- for a brief description of the 
  29. contents of these libraries. 
  30.  
  31.  
  32. ΓòÉΓòÉΓòÉ 1.2. Who Should Use This Book ΓòÉΓòÉΓòÉ
  33.  
  34. This book is designed as a reference for people who are familiar with the C++ 
  35. language in general, and with the characteristics of C++ classes in particular. 
  36. This book should help you to use the class libraries that are included with the 
  37. &cxxcompl.. 
  38.  
  39.  
  40. ΓòÉΓòÉΓòÉ 1.3. How to Use This Book ΓòÉΓòÉΓòÉ
  41.  
  42. This book has three parts that correspond to the three basic class libraries. 
  43. Part 2, Chapters 3 - 6, describes the Complex Mathematics Library. Part 3, 
  44. Chapters 6 - 18, describes the I/O Stream Library. Part 4, Chapters 19 - 23, 
  45. describes the Task Library. 
  46.  
  47. Each of these three parts can be read independently. If you need information 
  48. about the I/O Stream Library, begin by reading Chapter 6. It contains important 
  49. information about the organization of the I/O Stream Library, as well as some 
  50. essential definitions. This chapter is especially important for you if you are 
  51. familiar with the AT&T** or UNIX** System Laboratories C++ Language System 
  52. Iostream Library. New terms are defined in Chapter 6 to describe certain 
  53. aspects of the I/O Stream Library. These terms are not used in the 
  54. corresponding AT&T documentation for the Iostream Library. 
  55.  
  56.  
  57. ΓòÉΓòÉΓòÉ 1.3.1. Organization of  Chapters ΓòÉΓòÉΓòÉ
  58.  
  59. o Part 1. General Information 
  60.  
  61.    - Chapter 1, "Introduction"(the chapter you are reading now) describes the 
  62.      organization of the book and how to use it. 
  63.    - Chapter 2, "What are the Class Libraries?" introduces the three basic 
  64.      class libraries that are described in this book. 
  65.  
  66. o Part 2. The Complex Mathematics Library 
  67.  
  68.    - Chapter 3, "Introduction to the Complex Mathematics Library" lists the 
  69.      classes that make up the Complex Mathematics Library and provides a brief 
  70.      review of complex arithmetic. 
  71.    - Chapter 4, "complex Class"  describes complex, the class that lets you 
  72.      manipulate complex numbers. 
  73.    - Chapter 5, "c_exception Class" describes c_exception, the class that 
  74.      provides run-time error-handling facilities for the Complex Mathematics 
  75.      Library. 
  76.    - Chapter 5, "c_exception Class" describes c_exception, the class that 
  77.      provides run-time error-handling facilities for the Complex Mathematics 
  78.      Library. 
  79.  
  80. o Part 3. The I/O Stream Library 
  81.  
  82.    - Chapter 6, "Introduction to the I/O Stream Library"  introduces the I/O 
  83.      Stream Library. It lists the classes that make up the I/O Stream Library 
  84.      and the header files that contain their declarations. It also describes 
  85.      the key concept of stream buffers. 
  86.    - Chapter 7, "streambuf Protected Interface" describes those members of the 
  87.      streambuf class that you need to know about to create your own classes 
  88.      derived from streambuf. This part of the streambuf class is called the 
  89.      protected interface. 
  90.    - Chapter 8, "streambuf Public Interface" describes those members of the 
  91.      streambuf class that you can use directly to manipulate an object of 
  92.      filebuf, stdiobuf, or strstreambuf, the predefined classes that are 
  93.      derived from streambuf. This part of the streambuf class is called the 
  94.      public interface. 
  95.    - Chapter 9, "ios Class" describes ios, the base class for the classes that 
  96.      format data that comes from the stream buffer. 
  97.    - Chapter 10, "istream and istream_withassign Classes" describes istream, 
  98.      the class that lets you extract data from a stream buffer. This chapter 
  99.      also describes istream_withassign, a class derived from istream that 
  100.      includes an assignment operator. 
  101.    - Chapter 11, "ostream and ostream_withassign Classes" describes ostream, 
  102.      the classes that let you insert data into a stream buffer. This chapter 
  103.      also describes ostream_withassign, a class derived from ostream that 
  104.      includes an assignment operator. 
  105.    - Chapter 12,"iostream and iostream_withassign Classes" describes iostream, 
  106.      the class that is derived from istream and ostream, and 
  107.      iostream_withassign, the class that is derived from istream_withassign and 
  108.      ostream_withassign. 
  109.    - Chapter 13, "filebuf Class"  describes filebuf, the class that specializes 
  110.      streambuf to use files. 
  111.    - Chapter 14, "fstream, ifstream, and ofstream Classes" describes fstream, 
  112.      ifstream, and ofstream, the classes that adapt istream, ostream, and 
  113.      iostream, respectively, to use files. 
  114.    - Chapter 15, "strstreambuf Class"  describes strstreambuf, the class that 
  115.      specializes streambuf to use an array of bytes in memory as the source or 
  116.      target of data. 
  117.    - Chapter 16, "strstream, istrstream, and ostrstream Classes" describes 
  118.      istrstream, ostrstream, and strstream, the classes that adapt istream, 
  119.      ostream, and iostream, respectively, to use an array of bytes in memory as 
  120.      the source or target of data. 
  121.    - Chapter 17, "stdiobuf and stdiostream Classes"  describes stdiobuf, the 
  122.      class that lets you mix standard C input and output functions with the C++ 
  123.      I/O Stream Library input and output functions. 
  124.    - Chapter 18, "Manipulators"  describes the manipulators that allow you to 
  125.      use the input operator or the output operator to change the state of the 
  126.      stream that is being used as the source or target of data. 
  127.  
  128. o Part 4. The Task Library 
  129.  
  130.    - Chapter 19, "Introduction to the Task Library" gives an overview of the 
  131.      Task Library and lists the run-time error messages generated by the Task 
  132.      Library. 
  133.    - Chapter 20, "Task Handling Classes" describes object, sched, task, and 
  134.      timer, the task handling classes. These classes give you the facilities to 
  135.      create and manage tasks. 
  136.    - Chapter 21, "Queue Management Classes" describes qhead and qtail, the 
  137.      queue management classes. These classes let you implement a wide range of 
  138.      message-passing and data-buffering schemes. 
  139.    - Chapter 22, "Interrupt_handler Class" describes Interrupt_handler, the 
  140.      class that allows your tasks to handle external events in the form of 
  141.      signals from the operating system. 
  142.    - Chapter 23, "Simulation Classes"describes histogram, randint, urand, and 
  143.      erand, the simulation classes. These classes provide utilities for writing 
  144.      program simulations and gathering statistics about them. 
  145.  
  146. o Part 5. Appendices, Glossary, and Index 
  147.  
  148.    - Appendix A, "Table of Functions" lists all of the functions described in 
  149.      this book, along with their class and library, and references to the 
  150.      section of the book that describes them. 
  151.    - Appendix B, "Extended Complex Mathematics Library Examples"  contains an 
  152.      examples of how to determine the roots of a complex number and how to 
  153.      define your own complex_error function. 
  154.    - Appendix C, "Extended Task Library Examples" contains examples of how to 
  155.      use the Task Library to implement a parallel algorithm and an event-driven 
  156.      simulation. 
  157.  
  158.  
  159. ΓòÉΓòÉΓòÉ 1.3.2. Organization of Class Descriptions ΓòÉΓòÉΓòÉ
  160.  
  161. The chapters that contain detailed descriptions of classes (Chapters 4 - 5, 
  162. Chapters 7 - 18, and Chapters 20 - 23) have the following format: 
  163.  
  164. o An introduction to the classes being described. 
  165.  
  166. o A discussion of how to use the classes, if appropriate. 
  167.  
  168. o An excerpt from the appropriate header files that shows the relevant 
  169.   declarations for the classes being described. These excerpts are supposed to 
  170.   act as supplements to the member function descriptions. They are not complete 
  171.   listings of the header files. If you need to know the value of an element in 
  172.   an enumeration, or any other specific detail about the declaration of a 
  173.   class, you should look at the header file itself. 
  174.  
  175. o A description of each member function of each class that the chapter 
  176.   describes. For each class, this begins with a description of the constructor 
  177.   and destructor, if they exist. Descriptions of the remaining members follow 
  178.   in alphabetical order. For the more complicated classes, like streambuf, the 
  179.   descriptions of members with related operations are grouped together. In most 
  180.   classes, only public and protected members are described. Private members are 
  181.   only described if they are needed to describe a public member. In addition, 
  182.   none of the inherited members in a derived class is described in the 
  183.   discussion of that class, except for virtual functions that do not use the 
  184.   inherited function definition. 
  185.  
  186.  
  187. ΓòÉΓòÉΓòÉ 1.3.3. How to Find the Description of a Particular Function ΓòÉΓòÉΓòÉ
  188.  
  189. The organization of the class libraries can be difficult to understand. The I/O 
  190. Stream Library, especially, has a complicated hierarchy of classes. A function 
  191. may be defined in more than one class, and it may be overloaded in a single 
  192. class. Function name overloading gives C++ many advantages, but it also makes 
  193. it difficult to describe the functions in a simple, linear fashion. 
  194.  
  195. If you know the class in which a function is defined, you can go directly to 
  196. the chapter where that class is described. There, the functions are grouped 
  197. according to their purpose and listed alphabetically within each group. If a 
  198. class has more than one version of a function, all of the versions are 
  199. described in one section. 
  200.  
  201.  
  202. ΓòÉΓòÉΓòÉ 1.3.4. Fonts Used in This Book ΓòÉΓòÉΓòÉ
  203.  
  204. In this book, C++ code and code fragments appear in special font. 
  205. Uninstantiated variables appear in italics. 
  206.  
  207.  
  208. ΓòÉΓòÉΓòÉ 1.4. A Note about Examples ΓòÉΓòÉΓòÉ
  209.  
  210. The examples in this book explain elements of the C++ class libraries. They are 
  211. coded in a simple style. They do not try to conserve storage, check for errors, 
  212. achieve fast run times, or demonstrate all possible uses of a language element. 
  213.  
  214.  
  215. ΓòÉΓòÉΓòÉ 1.5. Related Documentation ΓòÉΓòÉΓòÉ
  216.  
  217. You might want to refer to the following publications for additional 
  218. information: 
  219.  
  220. IBM Publications: 
  221.  
  222. &BLcxxlr., &dnlr., describes the &cpp. language. 
  223.  
  224. The following is a sample of some non-IBM C++ publications that are generally 
  225. available. It is not an exhaustive list. IBM does not specifically recommend 
  226. any of these books, and other C++ publications may be available in your 
  227. locality. 
  228.  
  229. The Annotated C++ Reference Manual by Margaret A. Ellis and Bjarne Stroustrup, 
  230. Addison-Wesley Publishing Company. 
  231.  
  232. The C++ Programming Language (Second Edition) by Bjarne Stroustrup, 
  233. Addison-Wesley Publishing Company. 
  234.  
  235. C:super.++:esuper. Primer (Second Edition) by Stanley B. Lippman, 
  236. Addison-Wesley Publishing Company. 
  237.  
  238.  
  239. ΓòÉΓòÉΓòÉ 2. Chapter 2. What Are the Class Libraries? ΓòÉΓòÉΓòÉ
  240.  
  241. This chapter introduces the three class libraries that are described in this 
  242. book: 
  243.  
  244. o The Complex Mathematics Library provides you with the facilities to 
  245.   manipulate complex numbers and perform standard mathematical operations on 
  246.   them. 
  247.  
  248. o The I/O Stream Library (also known as the Iostream Library, see -- Reference 
  249.   h000175 not found --) provides you with the facilities to deal with many 
  250.   varieties of input and output. You can derive classes from this library to 
  251.   customize the input and output facilities for your own particular needs. 
  252.  
  253. o The Task Library provides you with the facilities to write programs that are 
  254.   made up of tasks. Tasks are lightweight (that is, they require fewer CPU 
  255.   resources than standard &opsysabbr. processes) and are nonpreemptive. The 
  256.   Task Library follows the coroutine paradigm. 
  257.  
  258. The following topics are described in this chapter: 
  259.  
  260. o History of the class libraries 
  261. o Compiling and linking programs that use class libraries 
  262. o Other class libraries 
  263.  
  264. You can also go back to the table of contents. 
  265.  
  266.  
  267. ΓòÉΓòÉΓòÉ 2.1. Other Class Libraries ΓòÉΓòÉΓòÉ
  268.  
  269. In addition to the three standard class libraries, &opcxx. also supports the 
  270. the Building Blocks Library.  This library provides you with the facilities to 
  271. create objects of common data structures such as linked lists and various kinds 
  272. of trees.  See the &BSbb. for details about this class library. 
  273.  
  274.  
  275. ΓòÉΓòÉΓòÉ 3. Chapter 3. Introduction to the Complex Mathematics Library ΓòÉΓòÉΓòÉ
  276.  
  277. This chapter introduces the Complex Mathematics Library. 
  278.  
  279. Appendix B, "Extended Complex Mathematics Library Examples" contains examples 
  280. of how you might use the Complex Mathematics Library. 
  281.  
  282. The following topics are described in this chapter: 
  283.  
  284. o Overview of the Complex Mathematics Library 
  285. o Review of complex numbers 
  286.  
  287. You can also go back to the table of contents. 
  288.  
  289.  
  290. ΓòÉΓòÉΓòÉ 3.1. Overview of the Complex Mathematics Library ΓòÉΓòÉΓòÉ
  291.  
  292. The Complex Mathematics Library is made up of two classes: 
  293.  
  294. o complex, the class that gives you the facilities to manipulate complex 
  295.   numbers and perform the standard mathematical operations on them. 
  296. o cexception, the class that lets you handle run-time errors that are created 
  297.   by the functions and operations in the complex class. 
  298.  
  299.  
  300. ΓòÉΓòÉΓòÉ 3.2. Review of Complex Numbers ΓòÉΓòÉΓòÉ
  301.  
  302. A complex number is made up of two parts: a real part and an imaginary part. A 
  303. complex number can be represented by an ordered pair (a, b ), where a is the 
  304. value of the real part of the number and b is the value of the imaginary part. 
  305. If ( a, b ) and ( c, d  ) are imaginary numbers, then the following statements 
  306. are true: 
  307.  
  308. o ( a, b ) + ( c, d ) = ( a + c, b + d ) 
  309.  
  310. o (a, b ) - ( c, d ) = ( a - c, b - d ) 
  311.  
  312. o ( a, b ) * ( c, d ) = ( ac - bd, ad + bc ) 
  313.  
  314. o ( a, b ) / ( c, d ) = ( ( ac + bd ) / ( c [2 ]+ d [2 ]), ( bc - ad ) / ( c 
  315.   [2] + d [2 ]) ) 
  316.  
  317. o The conjugate of a complex number ( a, b ) is ( a, - b ). 
  318.  
  319. o The absolute value or magnitude of a complex number ( a, b ) is the positive 
  320.   square root of the value a [2] +  b [2]. 
  321.  
  322. o The polar representation of ( a, b  ) is ( r, theta  ), where r is the 
  323.   distance from the origin to the point ( a, b ) in the complex plane, and 
  324.   theta is the angle from the real axis to the vector ( a, b ) in the complex 
  325.   plane. The angle theta can be positive or negative. "Figure: Polar 
  326.   Representation of Complex Number ( a, b )" illustrates the polar 
  327.   representation ( r, theta ) of the complex number ( a, b  ). 
  328.  
  329. ArtworkfromInterleafneedstoberedrawnorincluded
  330. from an encapsulated poststript file.
  331. Polar Representation of Complex Number ( a, b )
  332.  
  333.  
  334. ΓòÉΓòÉΓòÉ 4. Chapter 4. complex Class ΓòÉΓòÉΓòÉ
  335.  
  336. This chapter describes complex, the class that provides you with the facilities 
  337. to manipulate complex numbers. 
  338.  
  339. The following topics are described in this chapter: 
  340.  
  341. o Declarations for the complex class in the &complexH. header file 
  342. o Complex constructors 
  343. o Complex mathematical operators 
  344. o Complex input and output operators 
  345. o Complex mathematical functions 
  346. o Complex trigonometric functions 
  347. o Complex magnitude 
  348. o Complex conversions 
  349.  
  350. You can also go back to the table of contents. 
  351.  
  352.  
  353. ΓòÉΓòÉΓòÉ 4.1. Declarations for complex in the complex.h Header File ΓòÉΓòÉΓòÉ
  354.  
  355. You must include the following statement in any file that uses the complex 
  356. class: 
  357.  
  358. #include <complex.h>
  359.  
  360. The following is an excerpt from the &complexH. header file that shows the 
  361. relevant declarations for the member functions of the complex class: 
  362.  
  363. #include <iostream.h>
  364. #include <errno.h>
  365. #include <math.h>
  366.  
  367. #define DOMAIN        1
  368. #define SING          2
  369. #define OVERFLOW      3
  370. #define UNDERFLOW     4
  371.  
  372. #define M_E           2.7182818284590452354
  373. #define M_LOG2E       1.4426950408889634074
  374. #define M_LOG10E      0.43429448190325182765
  375. #define M_LN2         0.69314718055994530942
  376. #define M_LN10        2.30258509299404568402
  377. #define M_PI          3.14159265358979323846
  378. #define M_PI_2        1.57079632679489661923
  379. #define M_PI_4        0.78539816339744830962
  380. #define M_1_PI        0.31830988618379067154
  381. #define M_2_PI        0.63661977236758134308
  382. #define M_2_SQRTPI    1.12837916709551257390
  383. #define M_SQRT2       1.41421356237309504880
  384. #define M_SQRT1_2     0.70710678118654752440
  385.  
  386. class complex {
  387.  
  388.      double     re, im;
  389. public:
  390.      complex();
  391.      complex(double r, double i = 0.0);
  392.      friend double    real(const complex&);
  393.      friend double    imag(const complex&);
  394.      friend double    abs(complex);
  395.      friend double    norm(complex);
  396.      friend double    arg(complex);
  397.      friend complex   conj(complex);
  398.      friend complex   cos(complex);
  399.      friend complex   cosh(complex);
  400.      friend complex   exp(complex);
  401.      friend complex   log(complex);
  402.      friend complex   pow(double, complex);
  403.      friend complex   pow(complex, int);
  404.      friend complex   pow(complex, double);
  405.      friend complex   pow(complex, complex);
  406.      friend complex   polar(double, double = 0);
  407.      friend complex   sin(complex);
  408.      friend complex   sinh(complex);
  409.      friend complex   sqrt(complex);
  410.      friend complex   operator+(complex, complex);
  411.      friend complex   operator-(complex);
  412.      friend complex   operator-(complex, complex);
  413.      friend complex   operator*(complex, complex);
  414.      friend complex   operator/(complex, complex);
  415.      friend int       operator==(complex, complex);
  416.      friend int       operator!=(complex, complex);
  417.      void             operator+=(complex);
  418.      void             operator-=(complex);
  419.      void             operator*=(complex);
  420.      void             operator/=(complex);
  421. };
  422.  
  423. istream& operator>>(istream&, complex&);
  424. ostream& operator<<(ostream&, complex);
  425.  
  426. extern const complex complex_zero(0,0);
  427.  
  428. extern int errno;
  429.  
  430. Note:  This header file excerpt, and all of the other header file excerpts in 
  431. this book, are unpublished proprietary source code of AT&T and UNIX System 
  432. Laboratories. &copr.  Copyright 1991 AT&T and UNIX System Laboratories, Inc. 
  433. &copr. Copyright 1984, 1989, 1990 AT&T. All rights reserved. 
  434.  
  435.  
  436. ΓòÉΓòÉΓòÉ 4.1.1. Constants Defined in complex.h ΓòÉΓòÉΓòÉ
  437.  
  438. The following table lists the mathematical constants that the Complex 
  439. Mathematics Library defines (if they have not been previously defined): 
  440.  
  441. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  442. Γöé          Constants Defined in complex.h               Γöé
  443. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  444. Γöé CONSTANT NAME        Γöé DESCRIPTION                    Γöé
  445. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  446. Γöé M_E                  Γöé The constant e                 Γöé
  447. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  448. Γöé M_LOG2E              Γöé The logarithm of e to the base Γöé
  449. Γöé                      Γöé of 2                           Γöé
  450. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  451. Γöé M_LOG10E             Γöé The logarithm of e to the base Γöé
  452. Γöé                      Γöé of 10                          Γöé
  453. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  454. Γöé M_LN_2               Γöé The natural logarithm of 2     Γöé
  455. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  456. Γöé M_LN10               Γöé The natural logarithm of 10    Γöé
  457. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  458. Γöé M_PI                 Γöé ╤â                              Γöé
  459. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  460. Γöé M_PI_2               Γöé ╤â / 2                          Γöé
  461. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  462. Γöé M_PI_4               Γöé ╤â / 4                          Γöé
  463. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  464. Γöé M_1_PI               Γöé 1 / ╤â                          Γöé
  465. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  466. Γöé M_2_PI               Γöé 2 / ╤â                          Γöé
  467. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  468. Γöé M_2_SQRTPI           Γöé 2 divided by the square root   Γöé
  469. Γöé                      Γöé of ╤â                           Γöé
  470. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  471. Γöé M_SQRT2              Γöé The square root of 2           Γöé
  472. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  473. Γöé M_SQRT1_2            Γöé The square root of 1 / 2       Γöé
  474. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  475.  
  476.  
  477. ΓòÉΓòÉΓòÉ 4.2. Constructors for complex ΓòÉΓòÉΓòÉ
  478.  
  479. There are two versions of the complex constructor: 
  480.  
  481. complex();
  482. complex(double r, double i=0.0);
  483.  
  484. If you declare a complex object without specifying any values for the real or 
  485. imaginary part of the complex value, the constructor that takes no arguments is 
  486. used and the complex value is initialized to (0, 0). For example, the following 
  487. declaration gives the object comp the value (0, 0): 
  488.  
  489. complex comp;
  490.  
  491. If you give either one or two values in your declaration, the constructor that 
  492. takes two arguments is used. If you only give one value, the real part of the 
  493. complex object is initialized to that value, and the imaginary part is 
  494. initialized to 0. 
  495.  
  496. For example, the following declaration gives the object comp2 the value (3.14, 
  497. 0): 
  498.  
  499. complex comp2(3.14);
  500.  
  501. If you give two values in the declaration, the real part of the complex object 
  502. is initialized to the first value and the imaginary part is initialized to the 
  503. second value. For example, the following declaration gives the object comp3 the 
  504. value (3.14, 6.44): 
  505.  
  506. complex comp3(3.14, 6.44);
  507.  
  508. There is no explicit complex destructor. 
  509.  
  510.  
  511. ΓòÉΓòÉΓòÉ 4.2.1. Using the Complex Constructor to Initialize Arrays ΓòÉΓòÉΓòÉ
  512.  
  513. You can use the complex constructor to initialize arrays of complex numbers. If 
  514. the list of initial values is made up of complex values, each array element is 
  515. initialized to the corresponding value in the list of initial values. However, 
  516. if the list of initial values is not made up of complex values, the real parts 
  517. of the array elements are initialized to these initial values and the imaginary 
  518. parts of the array elements are initialized to 0. In the following example, the 
  519. elements of array b are initialized to the values in the initial value list, 
  520. but only the real parts of elements of array a are initialized to the values in 
  521. the initial value list. 
  522.  
  523. #include <complex.h>
  524.  
  525. void main() {
  526.      complex a[3] = {1.0, 2.0, 3.0};
  527.      complex b[3] = {complex(1.0, 1.0), complex(2.0, 2.0),
  528.                     complex(3.0, 3.0)};
  529.      cout << "Here is the first element of a: " << a[0] << endl;
  530.      cout << "Here is the first element of b: " << b[0] << endl;
  531. }
  532.  
  533. This example produces the following output: 
  534.  
  535. Here is the first element of a: ( 1, 0)
  536. Here is the first element of b: ( 1, 1)
  537.  
  538.  
  539. ΓòÉΓòÉΓòÉ 4.3. Mathematical Operators for complex ΓòÉΓòÉΓòÉ
  540.  
  541. The complex operators described in this section have the same precedence as the 
  542. corresponding real operators. 
  543.  
  544.  
  545. ΓòÉΓòÉΓòÉ 4.3.1. Addition ΓòÉΓòÉΓòÉ
  546.  
  547. friend complex operator+(complex x, complex
  548. y);
  549.  
  550. The addition operator returns the sum of x and y. 
  551.  
  552.  
  553. ΓòÉΓòÉΓòÉ 4.3.2. Subtraction ΓòÉΓòÉΓòÉ
  554.  
  555. friend complex operator-(complex x, complex
  556. y);
  557.  
  558. The subtraction operator returns the difference between x and y. 
  559.  
  560.  
  561. ΓòÉΓòÉΓòÉ 4.3.3. Negation ΓòÉΓòÉΓòÉ
  562.  
  563. friend complex operator-(complex x);
  564.  
  565. The negation operator returns (- a, - b) when its argument is (a, b). 
  566.  
  567.  
  568. ΓòÉΓòÉΓòÉ 4.3.4. Multiplication ΓòÉΓòÉΓòÉ
  569.  
  570. friend complex operator*(complex x, complex
  571. y)
  572.  
  573. The multiplication operator returns the product of x and y. 
  574.  
  575.  
  576. ΓòÉΓòÉΓòÉ 4.3.5. Division ΓòÉΓòÉΓòÉ
  577.  
  578. friend complex operator/(complex x, complex
  579. y)
  580.  
  581. The division operator returns the quotient of x divided by y. 
  582.  
  583.  
  584. ΓòÉΓòÉΓòÉ 4.3.6. Equality ΓòÉΓòÉΓòÉ
  585.  
  586. friend int operator==(complex x, complex y);
  587.  
  588. The  equality operator "==" returns a nonzero value if x equals y. This 
  589. operator tests for equality by testing that the two real components are equal 
  590. and that the two imaginary components are equal. 
  591.  
  592. Because both components are double values, the operator should really test for 
  593. an absolute difference (within a certain tolerance) between the two pairs of 
  594. corresponding components. See "Inequality" below for an example of a function 
  595. that performs such a test. 
  596.  
  597.  
  598. ΓòÉΓòÉΓòÉ 4.3.7. Inequality ΓòÉΓòÉΓòÉ
  599.  
  600. friend int operator!=(complex x, complex y);
  601.  
  602. The inequality operator "! =" returns a nonzero value if x does not equal y. 
  603. This operator tests for inequality by testing that the two real components are 
  604. not equal and that the two imaginary components are not equal. 
  605.  
  606. Because both components are double values, the operator should really test for 
  607. an absolute difference (within a certain tolerance) between the two pairs of 
  608. corresponding components. In the following example, the functions is_equal and 
  609. is_not_equal are defined to test whether two complex values are equal or not 
  610. equal, respectively, within a certain tolerance. You should use functions like 
  611. is_equal and is_not_equal, rather than the equality and inequality operators, 
  612. if you want a reliable comparison between two complex values. 
  613.  
  614.  
  615. #include
  616. <complex.h>
  617.  
  618. int is_equal(const complex &a, const complex &b,
  619.                const double tol=0.0001)
  620. {
  621.      return (abs(real(a) - real(b)) < tol &&
  622.                abs(imag(a) - imag(b)) < tol);
  623. }
  624.  
  625. int is_not_equal(const complex &a, const complex &b,
  626.                const double tol=0.0001)
  627. {
  628.      return !is_equal(a, b, tol);
  629. }
  630.  
  631. void main()
  632. {
  633.      complex c1 = complex(1.0, 2.0);
  634.      complex c2 = c1;
  635.      complex c3 = complex(3.0, 4.0);
  636.      if (is_equal(c1, c2))
  637.           cout << "c1 is equal to c2" <<
  638. endl;
  639.      else
  640.           cout << "c1 is not equal to c2 - not
  641. possible!" << endl;
  642.      if (is_not_equal(c1, c3))
  643.           cout << "c1 is not equal to c3" <<
  644. endl;
  645.      else
  646.           cout << "c1 is equal to c3 - not possible!"
  647. << endl;
  648. }
  649.  
  650. This example produces the following output: 
  651.  
  652. c1 is equal to c2
  653. c1 is not equal to c3
  654.  
  655.  
  656. ΓòÉΓòÉΓòÉ 4.3.8. Mathematical Assignment Operators ΓòÉΓòÉΓòÉ
  657.  
  658. void operator+=(complex x);
  659. void operator-=(complex x);
  660. void operator*=(complex x);
  661. void operator/=(complex x);
  662.  
  663. The following list describes the functions of the mathematical assignment 
  664. operators: 
  665.  
  666. o x + = y assigns the value of x  + 
  667.  
  668.      y
  669.   to x. 
  670. o x -  = y assigns the value of x -  y to x. 
  671. o x * = y assigns the value of x * y to x. 
  672. o x / = y assigns the value of x  / 
  673.  
  674.      y
  675.   to x. 
  676.  
  677. Note:  The assignment operators do not produce a value that can be used in an 
  678. expression. The following code, for example, produces a compile-time error: 
  679.  
  680.      complex x, y, z;     // valid declaration
  681.      x = (y += z);     // invalid assignment causes a
  682.                     // compile-time error
  683.  
  684.  
  685. ΓòÉΓòÉΓòÉ 4.3.9. Example ΓòÉΓòÉΓòÉ
  686.  
  687. The following example shows how you can use the complex mathematical operators: 
  688.  
  689.  
  690. #include
  691. <complex.h>
  692.  
  693. void main() {
  694.      complex a, b;
  695.      cout << "enter two complex values" << endl;
  696.      cin >> a >> b;
  697.      cout << "The sum of these two numbers is " << a+b << endl;
  698.      cout << "The difference between these two numbers is "
  699.           << a-b << endl;
  700.      cout << "The product of these two numbers is "
  701.           << a*b << endl;
  702.      cout << "The first number divided by the second is "
  703.           << a/b << endl;
  704.      }
  705.  
  706. If you run this program with the values ( 1, 1 ) and ( 2, 2 ) for input, the 
  707. output will look like this: 
  708.  
  709. enter two complex values
  710.  
  711. The sum of these two numbers is ( 3, 3)
  712. The difference between these two numbers is ( -1, -1)
  713. The product of these two numbers is ( 0, 4)
  714. The first number divided by the second is ( 0.5, 0)
  715.  
  716.  
  717. ΓòÉΓòÉΓòÉ 4.4. Input and Output Operators for complex ΓòÉΓòÉΓòÉ
  718.  
  719.  
  720. ΓòÉΓòÉΓòÉ 4.4.1. Input Operator ΓòÉΓòÉΓòÉ
  721.  
  722. istream& operator>>(istream& is, complex&
  723. c);
  724.  
  725. The input (or extraction) operator >> takes complex value c from the stream is 
  726. in the form ( a, b ). The parentheses and comma are mandatory delimiters for 
  727. input when the imaginary part of the complex number being read is nonzero. 
  728. Otherwise, they are optional. In both cases, whitespace is optional. 
  729.  
  730.  
  731. ΓòÉΓòÉΓòÉ 4.4.2. Output Operator ΓòÉΓòÉΓòÉ
  732.  
  733. ostream& operator<<(ostream& os, complex
  734. c);
  735.  
  736. The output (or insertion) operator <<  writes complex value c to the stream os 
  737. in the form ( a, b ). 
  738.  
  739.  
  740. ΓòÉΓòÉΓòÉ 4.4.3. Example ΓòÉΓòÉΓòÉ
  741.  
  742. #include <complex.h>
  743.  
  744. void main(){
  745.      complex x;
  746.      cout << "Enter a complex number in the form (a,b):" << endl;
  747.      cin >> x;
  748.      cout << "Here is the complex value: " << x << endl;
  749.      //
  750. }
  751.  
  752. This example produces the following output if you enter the complex value ( 3, 
  753. 4 ) at the prompt: 
  754.  
  755. Enter a complex number in the form (a,b):
  756. Here is the complex value: (3,4)
  757.  
  758.  
  759. ΓòÉΓòÉΓòÉ 4.5. Mathematical Functions for complex ΓòÉΓòÉΓòÉ
  760.  
  761.  
  762. ΓòÉΓòÉΓòÉ 4.5.1. exp - Exponent ΓòÉΓòÉΓòÉ
  763.  
  764. friend complex exp(complex x);
  765.  
  766. exp() returns the complex value equal to e [x] where x is the argument. The 
  767. table in Results of the Default Error-Handling Procedures shows the values 
  768. returned by the default error-handling procedure for exp(). 
  769.  
  770.  
  771. ΓòÉΓòÉΓòÉ 4.5.2. log -  Logarithm ΓòÉΓòÉΓòÉ
  772.  
  773. friend complex log(complex x);
  774.  
  775. log() returns the natural logarithm of the argument x. The table in Results of 
  776. the Default Error-Handling Procedures shows the values returned by the default 
  777. error-handling procedure for log(). 
  778.  
  779.  
  780. ΓòÉΓòÉΓòÉ 4.5.3. pow - Power ΓòÉΓòÉΓòÉ
  781.  
  782. friend complex pow(double d, complex z);
  783. friend complex pow(complex c, int i);
  784. friend complex pow(complex c, double d);
  785. friend complex pow(complex c, complex z);
  786.  
  787. pow() returns the complex value x[y], where x is the first argument and y is 
  788. the second argument. pow() is overloaded four times. If d is a double value, i 
  789. is an integer value, and c and z are complex values, then pow() can produce any 
  790. of the following results: 
  791.  
  792. o d[z] 
  793. o c[i] 
  794. o c[d] 
  795. o c[z] 
  796.  
  797.  
  798. ΓòÉΓòÉΓòÉ 4.5.4. sqrt - Square Root ΓòÉΓòÉΓòÉ
  799.  
  800. friend complex sqrt(complex x)
  801.  
  802. sqrt() returns the square root of its argument. If c and d are real values, 
  803. then every complex number ( a, b ), where: 
  804.  
  805. o a = c[2] - d[2] 
  806. o b = 2cd 
  807.  
  808. has two square roots: 
  809.  
  810. o ( c, d  ) 
  811. o ( - c, - d  ) 
  812.  
  813. sqrt() returns the square root that has a positive real part, that is, the 
  814. square root that is contained in the first or fourth quadrants of the complex 
  815. plane. 
  816.  
  817.  
  818. ΓòÉΓòÉΓòÉ 4.5.5. Example ΓòÉΓòÉΓòÉ
  819.  
  820. The following program shows how you can use the complex mathematical functions: 
  821.  
  822.  
  823. #include
  824. <complex.h>
  825.  
  826. void main() {
  827.      complex a, b;
  828.      int i;
  829.      double f;
  830.      //
  831.      // prompt the user for an argument for calls to
  832.      // exp(), log(), and sqrt()
  833.      //
  834.      cout << "Enter a complex value" << endl;
  835.      cin >> a;
  836.      cout << "The value of exp() for " << a << "  is: "
  837.                << exp(a) << endl;
  838.      cout << "The natural logarithm of " << a << " is: "
  839.                << log(a) << endl;
  840.      cout << "The square root of " << a << " is: " <<
  841.                sqrt(a) << endl << endl;
  842.      //
  843.      // prompt the user for arguments for calls to pow()
  844.  
  845.      //
  846.      cout << "Enter 2 complex values (a and b), an integer (i),";
  847.      cout << " and a floating point value (f)" << endl;
  848.      cin >> a >> b >> i >> f;
  849.      cout << "a is " << a << ", b is " << b << ", i is " << i;
  850.      cout << ", f is " << f << endl;
  851.      cout << "The value of f**a is: " << pow(f, a) << endl;
  852.      cout << "The value of a**i is: " << pow(a, i) << endl;
  853.      cout << "The value of a**f is: " << pow(a, f) << endl;
  854.      cout << "The value of a**b is: " << pow(a, b) << endl;
  855.      }
  856.  
  857. This program produces the following output when you give it ( 1,1 ), ( 1,1 ), ( 
  858. 1,0 ), 1, and 1.0 as input: 
  859.  
  860. Enter a complex value
  861.  
  862. The value of exp() for ( 1, 1)  is: ( 1.46869, 2.28736)
  863. The natural logarithm of ( 1, 1) is: ( 0.346574, 0.785398)
  864. The square root of ( 1, 1) is: ( 1.09868, 0.45509)
  865.  
  866. Enter 2 complex values (a and b), an integer (i),
  867. and a floating point value (f)
  868.  
  869. a is ( 1, 1), b is ( 1, 0), i is 1, f is 1
  870. The value of f**a is: ( 1, 0)
  871. The value of a**i is: ( 1, 1)
  872. The value of a**f is: ( 1, 1)
  873. The value of a**b is: ( 1, 1)
  874.  
  875.  
  876. ΓòÉΓòÉΓòÉ 4.6. Trigonometric Functions for complex ΓòÉΓòÉΓòÉ
  877.  
  878.  
  879. ΓòÉΓòÉΓòÉ 4.6.1. cos - Cosine ΓòÉΓòÉΓòÉ
  880.  
  881. friend complex cos(complex x);
  882.  
  883. cos() returns the cosine of x. 
  884.  
  885.  
  886. ΓòÉΓòÉΓòÉ 4.6.2. cosh -  Hyperbolic Cosine ΓòÉΓòÉΓòÉ
  887.  
  888. friend complex cosh(complex x);
  889.  
  890. cosh() returns the hyperbolic cosine of x. The table in Results of the Default 
  891. Error-Handling Procedures shows the values returned by the default 
  892. error-handling procedure for cosh(). 
  893.  
  894.  
  895. ΓòÉΓòÉΓòÉ 4.6.3. sin - Sine ΓòÉΓòÉΓòÉ
  896.  
  897. friend complex sin(complex x);
  898.  
  899. sin() returns the sine of x. 
  900.  
  901.  
  902. ΓòÉΓòÉΓòÉ 4.6.4. sinh - Hyperbolic Sine ΓòÉΓòÉΓòÉ
  903.  
  904. friend complex sinh(complex x);
  905.  
  906. sinh() returns the hyperbolic sine of x. 
  907.  
  908.  The table in Results of the Default Error-Handling Procedures
  909. shows the values returned by the default error-handling procedure for sinh(). 
  910.  
  911.  
  912. ΓòÉΓòÉΓòÉ 4.6.5. Example ΓòÉΓòÉΓòÉ
  913.  
  914. The following example shows how you can use the complex trigonometric 
  915. functions: 
  916.  
  917. #include <complex.h>
  918.  
  919. void main() {
  920.      complex a  = (M_PI, M_PI_2);  // a = (pi,pi/2)
  921.      //
  922.      // display the values of cos(), cosh(), sin(), and sinh()
  923.      // for (pi,pi/2)
  924.      //
  925.      cout << "The value of cos() for (pi,pi/2) is: "
  926.           << cos(a) << endl;
  927.      cout << "The value of cosh() for (pi,pi/2) is: "
  928.           << cosh(a) << endl;
  929.      cout << "The value of sin() for (pi,pi/2) is: "
  930.           << sin(a) << endl;
  931.      cout << "The value of sinh() for (pi,pi/2) is: "
  932.           << sinh(a) << endl;
  933.      }
  934.  
  935. This program produces the following output: 
  936.  
  937. The value of cos() for (pi,pi/2)  is: ( 6.12323e-17, 0)
  938. The value of cosh() for (pi,pi/2) is: ( 2.50918, 0)
  939. The value of sin() for (pi,pi/2) is: ( 1, -0)
  940. The value of sinh() for (pi,pi/2) is: ( 2.3013, 0)
  941.  
  942.  
  943. ΓòÉΓòÉΓòÉ 4.7. Magnitude Functions for complex ΓòÉΓòÉΓòÉ
  944.  
  945.  
  946. ΓòÉΓòÉΓòÉ 4.7.1. abs - Absolute Value ΓòÉΓòÉΓòÉ
  947.  
  948. friend double abs(complex x);
  949.  
  950. abs() returns the absolute value or magnitude of its argument. The absolute 
  951. value of a complex value ( a, b ) is the positive square root of a [2] + b [2]. 
  952.  
  953.  
  954. ΓòÉΓòÉΓòÉ 4.7.2. norm - Square Magnitude ΓòÉΓòÉΓòÉ
  955.  
  956. friend double norm(complex x);
  957.  
  958. norm() returns the square of the magnitude of its argument. If the argument x 
  959. is equal to the complex number ( a, b ), norm() returns the value a [2]+b [2]. 
  960. norm() is faster than  abs(), but it is more likely to cause overflow errors. 
  961.  
  962.  
  963. ΓòÉΓòÉΓòÉ 4.8. Conversion Functions for complex ΓòÉΓòÉΓòÉ
  964.  
  965. The conversion functions in the Complex Mathematics Library allow you to 
  966. convert between the polar and standard complex representations of a value and 
  967. to extract the real and imaginary parts of a complex value. 
  968.  
  969.  
  970. ΓòÉΓòÉΓòÉ 4.8.1. arg - Angle in Radians ΓòÉΓòÉΓòÉ
  971.  
  972. friend double arg(complex x);
  973.  
  974. arg() returns the angle (in radians) of the polar representation of its 
  975. argument. If the argument x is equal to the complex number ( a, b ), the angle 
  976. returned is the angle in radians on the complex plane between the real axis and 
  977. the vector ( a, b ). The return value has a range of -p to p. See -- Reference 
  978. UAF1d0mrya. not found -- for an illustration of the polar representation of 
  979. complex numbers. 
  980.  
  981.  
  982. ΓòÉΓòÉΓòÉ 4.8.2. conj - Conjugation ΓòÉΓòÉΓòÉ
  983.  
  984. friend complex conj(complex x);
  985.  
  986. conj() returns the complex value equal to ( a, - b ) if the input argument x is 
  987. equal to ( a, b ). 
  988.  
  989.  
  990. ΓòÉΓòÉΓòÉ 4.8.3. polar - Polar to Complex ΓòÉΓòÉΓòÉ
  991.  
  992. friend complex polar(double a, double b
  993. = 0);
  994.  
  995. polar() returns the standard complex representation of the complex number that 
  996. has a polar representation ( a, b ). 
  997.  
  998.  
  999. ΓòÉΓòÉΓòÉ 4.8.4. real - Extract Real Part ΓòÉΓòÉΓòÉ
  1000.  
  1001. friend double real(const complex& x);
  1002.  
  1003. real() extracts the real part of the complex number x. 
  1004.  
  1005.  
  1006. ΓòÉΓòÉΓòÉ 4.8.5. imag - Extract Imaginary Part ΓòÉΓòÉΓòÉ
  1007.  
  1008. friend double imag(const complex& x);
  1009.  
  1010. imag() extracts the imaginary part of the complex number x. 
  1011.  
  1012.  
  1013. ΓòÉΓòÉΓòÉ 4.8.6. Example ΓòÉΓòÉΓòÉ
  1014.  
  1015. The following program shows how you can use the complex conversion functions: 
  1016.  
  1017.  
  1018. #include <complex.h>
  1019.  
  1020. void main() {
  1021.      complex a;
  1022.      //
  1023.      // for a value supplied by the user, display the real part,
  1024.      // the imaginary part, and the polar representation
  1025.      //
  1026.      cout << "enter a complex value" << endl;
  1027.      cin >> a;
  1028.      cout << "the real part of this value is "
  1029.           << real(a) << endl;
  1030.      cout << "the imaginary part of this value is "
  1031.           << imag(a) << endl;
  1032.      cout << "the polar representation of this value is "
  1033.           << "(" << abs(a) << "," << arg(a) << ")" << endl;
  1034.      }
  1035.  
  1036. This program produces the following output when you give it ( 1,1 ) as input: 
  1037.  
  1038. enter a complex value
  1039.  
  1040. the real part of this value is 1
  1041. the imaginary part of this value is 1
  1042. the polar representation of this value is (1.41421,0.785398)
  1043.  
  1044.  
  1045. ΓòÉΓòÉΓòÉ 5. Chapter 5. c_exception Class ΓòÉΓòÉΓòÉ
  1046.  
  1047. This chapter describes c_exception, the class that lets you handle errors that 
  1048. are created by the functions and operations in the complex class. 
  1049.  
  1050. The following topics are described in this chapter: 
  1051.  
  1052. o Declarations for cexception in the &complexH. header file 
  1053. o Constructor for cexception 
  1054. o Data members of cexception 
  1055. o Errors handled by the Complex Mathematics Library 
  1056. o Errors handled outside of the Complex Mathematics Library 
  1057.  
  1058. You can also go back to the table of contents. 
  1059.  
  1060.  
  1061. ΓòÉΓòÉΓòÉ 5.1. Declarations for c_exception in the complex.h Header File ΓòÉΓòÉΓòÉ
  1062.  
  1063. You must include the following statement in any file that uses members of the 
  1064. c_exception class: 
  1065.  
  1066. #include <complex.h>
  1067.  
  1068. The following is an excerpt from the &complexH. header file that shows the 
  1069. relevant declarations for the members of cexception: 
  1070.  
  1071. #define DOMAIN        1
  1072. #define SING          2
  1073. #define OVERFLOW      3
  1074. #define UNDERFLOW     4
  1075.  
  1076. extern int errno;
  1077.  
  1078. class c_exception
  1079.  
  1080. {
  1081.      int         type;
  1082.      char        *name;
  1083.      complex     arg1;
  1084.      complex     arg2;
  1085.      complex     retval;
  1086. public:
  1087.      c_exception( char *n, const complex& a1,
  1088.                   const complex& a2 = complex_zero)
  1089.      friend int complex_error( c_exception& );
  1090.      friend complex exp( complex );
  1091.      friend complex sinh( complex );
  1092.      friend complex cosh( complex );
  1093.      friend complex log( complex );
  1094. };
  1095.  
  1096.  
  1097. ΓòÉΓòÉΓòÉ 5.2. Constructor for c_exception ΓòÉΓòÉΓòÉ
  1098.  
  1099. c_exception(char *n, const complex& a1,
  1100.                 const complex& a2 = complex_zero);
  1101.  
  1102. The cexception constructor creates a cexception object with name member equal 
  1103. to n, arg1 member equal to a1, and arg2 member equal to a2. 
  1104.  
  1105.  
  1106. ΓòÉΓòÉΓòÉ 5.3. Data Members of c_exception ΓòÉΓòÉΓòÉ
  1107.  
  1108.  
  1109. ΓòÉΓòÉΓòÉ 5.3.1. arg1, arg2 - Arguments of the Function that Caused the Error ΓòÉΓòÉΓòÉ
  1110.  
  1111. complex arg1;
  1112. complex arg2;
  1113.  
  1114. arg1 and arg2 are the arguments with which the function that caused the error 
  1115. was called. 
  1116.  
  1117.  
  1118. ΓòÉΓòÉΓòÉ 5.3.2. name - Name of the Function that Caused the Error ΓòÉΓòÉΓòÉ
  1119.  
  1120. char *name;
  1121.  
  1122. name is a string that contains the name of the function where the error 
  1123. occurred. 
  1124.  
  1125.  
  1126. ΓòÉΓòÉΓòÉ 5.3.3. retval - Value Returned by the Default Definition of the Error Handling Function ΓòÉΓòÉΓòÉ
  1127.  
  1128. complex retval;
  1129.  
  1130. retval is the value that the default definition of the error handling function 
  1131. complex_error() returns. You can make your own definition of complex_error() 
  1132. return a different value. 
  1133.  
  1134.  
  1135. ΓòÉΓòÉΓòÉ 5.3.4. type - Type of Error that Has Occurred ΓòÉΓòÉΓòÉ
  1136.  
  1137. int type;
  1138.  
  1139. type describes the type of error that has occurred. It can take the following 
  1140. values that are defined in the &complexH. header file: 
  1141.  
  1142. o SING argument singularity 
  1143. o OVERFLOW overflow range error 
  1144. o UNDERFLOW underflow range error. 
  1145.  
  1146.  
  1147. ΓòÉΓòÉΓòÉ 5.4. Errors Handled by the Complex Mathematics Library ΓòÉΓòÉΓòÉ
  1148.  
  1149.  
  1150. ΓòÉΓòÉΓòÉ 5.4.1. complex_error - the Error-Handling Function ΓòÉΓòÉΓòÉ
  1151.  
  1152. friend int complex_error(c_exception& ce);
  1153.  
  1154. complex_error() is invoked by member functions of the Complex Mathematics 
  1155. Library when errors are detected. The argument ce refers to the cexception 
  1156. object that contains information about the error. You can define your own 
  1157. procedures for handling errors by defining a function called complex_error with 
  1158. return type int and a single parameter of type c_exception&. 
  1159.  
  1160. If you define your own complex_error function and this function returns a 
  1161. nonzero value, no error message will be generated and the external variable 
  1162. errno will not be set. If this function returns zero, errno is given the value 
  1163. of one of the following constants: 
  1164.  
  1165. o ERANGE if the result is too large or too small 
  1166. o EDOM if there is a domain error within a mathematical function. 
  1167.  
  1168. These constants are defined in &errnoH.. 
  1169.  
  1170.  
  1171. ΓòÉΓòÉΓòÉ 5.4.2. Results of the Default Error-Handling Procedures ΓòÉΓòÉΓòÉ
  1172.  
  1173. If you do not define your own complex_error, the default error-handling 
  1174. procedures will be invoked when an error occurs. The results for a given input 
  1175. complex value (a, b) depend on the kind of error and the sign of the cosine and 
  1176. sine of b. The following table shows the return value of the default 
  1177. error-handling procedure and the value given to errno for each function with 
  1178. input equal to the complex value (a, b). The following symbols appear in this 
  1179. table: 
  1180.  
  1181.  1. NA - not applicable. The result of the error depends on the sign of the 
  1182.     cosine and sine of b (the imaginary part of the argument) unless "NA" 
  1183.     appears in the Cosine b or Sine b columns. 
  1184.  
  1185.  2. HUGE - the maximum double value. This value is defined in the header file 
  1186.     math.h. 
  1187.  
  1188. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1189. Γöé          Results of the Default Error-Handling Procedures      Γöé
  1190. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1191. Γöé FuncΓöéiError  Γöé Cosine  Γöé Sine b  Γöé Return      Γöé errno Value   Γöé
  1192. Γöé     Γöé        Γöé b       Γöé         Γöé Value       Γöé               Γöé
  1193. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1194. Γöé coshΓöé a too  Γöé nonneg- Γöé nonneg- Γöé ("Γö╝HUGE,Γö╝HUGΓöé""ERANGE"      Γöé
  1195. Γöé     Γöé large  Γöé ative   Γöé ative   Γöé             Γöé               Γöé
  1196. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1197. Γöé coshΓöé a too  Γöé nonneg- Γöé nega-   Γöé ("Γö╝HUGE,-HUGΓöé""ERANGE"      Γöé
  1198. Γöé     Γöé large  Γöé ative   Γöé tive    Γöé             Γöé               Γöé
  1199. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1200. Γöé coshΓöé a too  Γöé nonneg- Γöé nonneg- Γöé ("Γö╝HUGE,-HUGΓöé""ERANGE"      Γöé
  1201. Γöé     Γöé small  Γöé ative   Γöé ative   Γöé             Γöé               Γöé
  1202. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1203. Γöé coshΓöé a too  Γöé nonneg- Γöé nega-   Γöé ("Γö╝HUGE,Γö╝HUGΓöé""ERANGE"      Γöé
  1204. Γöé     Γöé small  Γöé ative   Γöé tive    Γöé             Γöé               Γöé
  1205. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1206. Γöé coshΓöé a too  Γöé nega-   Γöé nonneg- Γöé ("-HUGE,-HUGΓöé""ERANGE"      Γöé
  1207. Γöé     Γöé small  Γöé tive    Γöé ative   Γöé             Γöé               Γöé
  1208. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1209. Γöé coshΓöé a too  Γöé nega-   Γöé nega-   Γöé ("-HUGE,Γö╝HUGΓöé""ERANGE"      Γöé
  1210. Γöé     Γöé small  Γöé tive    Γöé tive    Γöé             Γöé               Γöé
  1211. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1212. Γöé coshΓöé b too  Γöé nega-   Γöé nonneg- Γöé ("-HUGE,Γö╝HUGΓöé""ERANGE"      Γöé
  1213. Γöé     Γöé large  Γöé tive    Γöé ative   Γöé             Γöé               Γöé
  1214. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1215. Γöé coshΓöé b too  Γöé nega-   Γöé nega-   Γöé ("-HUGE,-HUGΓöé""ERANGE"      Γöé
  1216. Γöé     Γöé large  Γöé tive    Γöé tive    Γöé             Γöé               Γöé
  1217. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1218. Γöé coshΓöé b too  Γöé NA      Γöé NA      Γöé (0,0)       Γöé "ERANGE"      Γöé
  1219. Γöé     Γöé small  Γöé         Γöé         Γöé             Γöé               Γöé
  1220. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1221. Γöé exp Γöé a too  Γöé posi-   Γöé posi-   Γöé ("Γö╝HUGE,Γö╝HUGΓöé""ERANGE"      Γöé
  1222. Γöé     Γöé large  Γöé tive    Γöé tive    Γöé             Γöé               Γöé
  1223. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1224. Γöé exp Γöé a too  Γöé posi-   Γöé nonpos- Γöé ("Γö╝HUGE,-HUGΓöé""ERANGE"      Γöé
  1225. Γöé     Γöé large  Γöé tive    Γöé itive   Γöé             Γöé               Γöé
  1226. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1227. Γöé exp Γöé a too  Γöé nonpos- Γöé posi-   Γöé ("-HUGE,Γö╝HUGΓöé""ERANGE"      Γöé
  1228. Γöé     Γöé large  Γöé itive   Γöé tive    Γöé             Γöé               Γöé
  1229. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1230. Γöé exp Γöé a too  Γöé nonpos- Γöé nonpos- Γöé ("-HUGE,-HUGΓöé""ERANGE"      Γöé
  1231. Γöé     Γöé large  Γöé itive   Γöé itive   Γöé             Γöé               Γöé
  1232. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1233. Γöé exp Γöé a too  Γöé NA      Γöé NA      Γöé ("0,0")     Γöé "ERANGE"      Γöé
  1234. Γöé     Γöé small  Γöé         Γöé         Γöé             Γöé               Γöé
  1235. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1236. Γöé exp Γöé b too  Γöé NA      Γöé NA      Γöé ("0,0")     Γöé "ERANGE"      Γöé
  1237. Γöé     Γöé large  Γöé         Γöé         Γöé             Γöé               Γöé
  1238. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1239. Γöé exp Γöé b too  Γöé NA      Γöé NA      Γöé ("0,0")     Γöé "ERANGE"      Γöé
  1240. Γöé     Γöé small  Γöé         Γöé         Γöé             Γöé               Γöé
  1241. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1242. Γöé log Γöé a too  Γöé posi-   Γöé posi-   Γöé ("Γö╝HUGE,0") Γöé "EDOM" ( A    Γöé
  1243. Γöé     Γöé large  Γöé tive    Γöé tive    Γöé             Γöé message is    Γöé
  1244. Γöé     Γöé        Γöé         Γöé         Γöé             Γöé also          Γöé
  1245. Γöé     Γöé        Γöé         Γöé         Γöé             Γöé produced.)    Γöé
  1246. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1247. Γöé sinhΓöé a too  Γöé nonneg- Γöé nonneg- Γöé ("Γö╝HUGE,Γö╝HUGΓöé""ERANGE"      Γöé
  1248. Γöé     Γöé large  Γöé ative   Γöé ative   Γöé             Γöé               Γöé
  1249. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1250. Γöé sinhΓöé a too  Γöé nonneg- Γöé nega-   Γöé ("Γö╝HUGE,-HUGΓöé""ERANGE"      Γöé
  1251. Γöé     Γöé large  Γöé ative   Γöé tive    Γöé             Γöé               Γöé
  1252. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1253. Γöé sinhΓöé a too  Γöé nega-   Γöé nonneg- Γöé ("-HUGE,Γö╝HUGΓöé""ERANGE"      Γöé
  1254. Γöé     Γöé large  Γöé tive    Γöé ative   Γöé             Γöé               Γöé
  1255. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1256. Γöé sinhΓöé a too  Γöé nega-   Γöé nega-   Γöé ("-HUGE,-HUGΓöé""ERANGE"      Γöé
  1257. Γöé     Γöé large  Γöé tive    Γöé tive    Γöé             Γöé               Γöé
  1258. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1259. Γöé sinhΓöé a too  Γöé nonneg- Γöé nonneg- Γöé ("-HUGE,Γö╝HUGΓöé""ERANGE"      Γöé
  1260. Γöé     Γöé small  Γöé ative   Γöé ative   Γöé             Γöé               Γöé
  1261. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1262. Γöé sinhΓöé a too  Γöé nonneg- Γöé nega-   Γöé ("-HUGE,-HUGΓöé""ERANGE"      Γöé
  1263. Γöé     Γöé small  Γöé ative   Γöé tive    Γöé             Γöé               Γöé
  1264. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1265. Γöé sinhΓöé a too  Γöé nega-   Γöé nonneg- Γöé ("Γö╝HUGE,Γö╝HUGΓöé""ERANGE"      Γöé
  1266. Γöé     Γöé small  Γöé tive    Γöé ative   Γöé             Γöé               Γöé
  1267. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1268. Γöé sinhΓöé a too  Γöé nega-   Γöé nega-   Γöé ("Γö╝HUGE,-HUGΓöé""ERANGE"      Γöé
  1269. Γöé     Γöé small  Γöé tive    Γöé tive    Γöé             Γöé               Γöé
  1270. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1271. Γöé sinhΓöé b too  Γöé NA      Γöé NA      Γöé ("0,0")     Γöé "ERANGE"      Γöé
  1272. Γöé     Γöé large  Γöé         Γöé         Γöé             Γöé               Γöé
  1273. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1274. Γöé sinhΓöé b too  Γöé NA      Γöé NA      Γöé ("0,0")     Γöé "ERANGE"      Γöé
  1275. Γöé     Γöé small  Γöé         Γöé         Γöé             Γöé               Γöé
  1276. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1277.  
  1278.  
  1279. ΓòÉΓòÉΓòÉ 5.5. Errors Handled Outside of the Complex Mathematics Library ΓòÉΓòÉΓòÉ
  1280.  
  1281. There are some cases where member functions of the Complex Mathematics Library 
  1282. call functions in the math library. These calls can cause underflow and 
  1283. overflow conditions that are handled by the matherr() function that is declared 
  1284. in the math.h header file. For example, the overflow conditions that are caused 
  1285. by the following calls are handled by matherr(): 
  1286.  
  1287. o exp(complex(MAXDOUBLE, MAXDOUBLE)) 
  1288. o pow(complex(MAXDOUBLE, MAXDOUBLE), INT_MAX) 
  1289. o norm(complex(MAXDOUBLE, MAXDOUBLE)). 
  1290.  
  1291. MAXDOUBLE is the maximum valid double value. INT_MAX is the maximum int value. 
  1292. Both these constants are defined in limits.h. 
  1293.  
  1294. If you do not want the default error-handling defined by matherr(), you should 
  1295. define your own version of matherr(). 
  1296.  
  1297.  
  1298. ΓòÉΓòÉΓòÉ 6. Chapter 6. Introduction to the I/O Stream Library ΓòÉΓòÉΓòÉ
  1299.  
  1300. This chapter describes the overall structure of the I/O Stream Library. This 
  1301. class library provides you with the facilities to deal with many varieties of 
  1302. input and output. 
  1303.  
  1304. The following topics are described in this chapter: 
  1305.  
  1306. o The I/O Stream Library and &stdioH. in C 
  1307. o Overview of the I/O Stream Library 
  1308. o The I/O Stream Library class hierarchy 
  1309. o The I/O Stream Library header files 
  1310. o Predefined streams 
  1311. o Anonymous streams 
  1312. o Stream buffers 
  1313.  
  1314. You can also go back to the table of contents. 
  1315.  
  1316.  
  1317. ΓòÉΓòÉΓòÉ 6.1. The I/O Stream Library and stdio.h in C ΓòÉΓòÉΓòÉ
  1318.  
  1319. In both C++ and C, input and output are described in terms of sequences of 
  1320. characters, or streams. The I/O Stream Library provides the same facilities in 
  1321. C++ that &stdioH. provides in C, but it also has the following advantages over 
  1322. &stdioH.: 
  1323.  
  1324. o The input or extraction (>>) operator and the output or insertion (<<) 
  1325.   operator are typesafe and easy to use. 
  1326. o You can define input and output for your own types or classes by overloading 
  1327.   the output and input operators. This gives you a uniform way of performing 
  1328.   input and output for different types of data. 
  1329. o The input and output operators are more efficient than scanf() and printf(), 
  1330.   the analogous C functions defined in &stdioH.. Both scanf() and printf() take 
  1331.   format strings as arguments, and these format strings have to be parsed at 
  1332.   run time. The bindings for the output and input operators are done at compile 
  1333.   time. 
  1334.  
  1335.  
  1336. ΓòÉΓòÉΓòÉ 6.2. Overview of the I/O Stream Library ΓòÉΓòÉΓòÉ
  1337.  
  1338. The I/O Stream Library is the standard input and output library for C++. In 
  1339. C++, input and output are described in terms of sequences of characters, or 
  1340. streams. The processing of these streams is done at two levels. The first level 
  1341. treats the data as sequences of characters; the second level treats it as a 
  1342. series of values of a particular type. 
  1343.  
  1344. There are two primary base classes for the I/O Stream Library: 
  1345.  
  1346.  1. The streambuf class and the classes derived from it (strstream, stdiobuf, 
  1347.     and filebuf) implement the stream buffers. Stream buffers act as temporary 
  1348.     repositories for characters that are coming from the ultimate producers of 
  1349.     input or are being sent to the ultimate consumers of output. See Stream 
  1350.     Buffers for more details. 
  1351.  
  1352.  2. The ios class maintains formatting and error state information for these 
  1353.     streams. The classes derived from ios implement the formatting of these 
  1354.     streams. This formatting involves converting sequences of characters from 
  1355.     the stream buffer into values of a particular type and converting values of 
  1356.     a particular type into their external display format. 
  1357.  
  1358. The I/O Stream Library predefines streams for standard input, standard output, 
  1359. and standard error. See Predefined Streams for more details on the predefined 
  1360. streams. If you want to open your own streams for input or output, you must 
  1361. create an iostream object. The iostream constructor takes as an argument a 
  1362. pointer to a streambuf object. This object is associated with the device, file, 
  1363. or array of bytes in memory that is going to be the ultimate producer of input 
  1364. or the ultimate consumer of output. 
  1365.  
  1366.  
  1367. ΓòÉΓòÉΓòÉ 6.2.1. Combining Input and Output of Different Types ΓòÉΓòÉΓòÉ
  1368.  
  1369. The I/O Stream Library overloads the input (>>) and output (<<) operators for 
  1370. the built-in types. As a result, you can combine input or output of values with 
  1371. different types in a single statement without having to state the type of the 
  1372. values. The following example shows how values with a variety of types can be 
  1373. combined in a single output statement: 
  1374.  
  1375.  
  1376. #include
  1377. <iostream.h>
  1378.  
  1379. void main(){
  1380.      int i = 3;
  1381.      long l = 88888888L;
  1382.      double d = 3.14;
  1383.      float f = 2.1F;
  1384.      char c = 'b';
  1385.      cout << "A variety of values: int " << i
  1386.           << ", long " << l << ", double " << d
  1387.           << ", float " << f << ", char " << c << endl;
  1388. }
  1389.  
  1390.  
  1391. ΓòÉΓòÉΓòÉ 6.2.2. Input and Output for User-Defined Classes ΓòÉΓòÉΓòÉ
  1392.  
  1393. You can overload the input and output operators for the classes that you create 
  1394. yourself. Once you have overloaded the input and output operators for a class, 
  1395. you can perform input and output operations on objects of that class in the 
  1396. same way that you would perform input and output on char, int, double, and the 
  1397. other built-in types. 
  1398.  
  1399. The following example shows how you can overload the input and output operators 
  1400. for your own classes. The class circle has two private members that record the 
  1401. centre and radius of a circle. In the example, the value of a circle object is 
  1402. printed using the overloaded output operator. The user is then prompted to 
  1403. supply values that are assigned to another circle object. The value of this 
  1404. circle object is then printed. 
  1405.  
  1406.  
  1407. #include <iostream.h>
  1408.  
  1409. class Circle {
  1410. public:
  1411.      Circle(double c=0.0, double r=0.0): centre(c), radius(r){}
  1412.  
  1413. private:
  1414.      double centre;
  1415.      double radius;
  1416.      friend ostream& operator<<(ostream& o, const Circle& c);
  1417.      friend istream& operator>>(istream& i, Circle& c);
  1418. };
  1419.  
  1420. ostream& operator<<(ostream& o, const Circle& c)
  1421. {
  1422.      o << c.centre << " " << c.radius << endl;
  1423.      return o;
  1424. }
  1425.  
  1426. istream& operator>>(istream& i, Circle& c)
  1427. {
  1428.      i >> c.centre >> c.radius;
  1429.      return i;
  1430. }
  1431.  
  1432. void main()
  1433. {
  1434.      Circle c(1.5, 3.0);
  1435.      Circle d;
  1436.      cout << "Circle c " << c << endl;
  1437.      cout << "Enter the centre and radius of your circle: " << endl;
  1438.      cin >> d;
  1439.      cout << "Here is your circle " << d << endl;
  1440. }
  1441.  
  1442.  
  1443. ΓòÉΓòÉΓòÉ 6.3. The I/O Stream Library Class Hierarchy ΓòÉΓòÉΓòÉ
  1444.  
  1445. The I/O Stream Library has two base classes that correspond to the two levels 
  1446. of processing described in "Overview of the Stream Library": 
  1447.  
  1448. o The streambuf class implements stream buffers (see Stream Buffers).  It is 
  1449.   the base class for the following classes: 
  1450.  
  1451.    - strstreambuf 
  1452.    - stdiobuf 
  1453.    - filebuf. 
  1454.  
  1455. o The ios class maintains formatting and error state information for streams. 
  1456.   Streams are implemented as objects of the following classes that are derived 
  1457.   from ios: 
  1458.  
  1459.    - stdiostream 
  1460.    - istream 
  1461.    - ostream. 
  1462.  
  1463.   The classes that are derived from ios are themselves base classes: 
  1464.  
  1465. o istream is the input stream class. It implements stream buffer input, or 
  1466.   input operations.The following classes are derived from istream: 
  1467.  
  1468.    - istrstream 
  1469.    - ifstream 
  1470.    - istreamwithassign 
  1471.    - iostream. 
  1472.  
  1473. o ostream is the output stream class. It implements stream buffer output, or 
  1474.   output operations. The following classes are derived from ostream: 
  1475.  
  1476.    - ostrstream 
  1477.    - ofstream 
  1478.    - &ostreamwith. 
  1479.    - iostream. 
  1480.  
  1481. o iostream is the class that combines istream and ostream to implement input 
  1482.   and output to stream buffers. The following classes are derived from 
  1483.   iostream: 
  1484.  
  1485.    - strstream 
  1486.    - iostreamwithassign 
  1487.    - fstream. 
  1488.  
  1489. Note:  The I/O Stream Library defines other classes in addition to those listed 
  1490. above. These classes include fstreambase and strstreambase. These classes are 
  1491. meant for the internal use of the I/O Stream Library. They are described in 
  1492. this book because their member functions are used directly by one or more of 
  1493. the classes listed above. You should not use these internal classes directly. 
  1494.  
  1495. -- Reference UN290mrya not found -- shows the relationship between the two base 
  1496. classes, ios and streambuf, and their derived classes. In the figure, two 
  1497. classes are connected by an arrow if the class at the pointed end of the arrow 
  1498. is derived from the class at the other end of the arrow. 
  1499.  
  1500.  
  1501.  
  1502. Artwork from Interleaf needs to be redrawn or included
  1503. from anencapsulated poststript file.
  1504.  
  1505.  
  1506. The Structure of Stream Buffers
  1507.  
  1508.  
  1509. ΓòÉΓòÉΓòÉ 6.4. The I/O Stream Library Header Files ΓòÉΓòÉΓòÉ
  1510.  
  1511. To use a class in the I/O Stream Library, you must include the appropriate 
  1512. header files for that class. The following is a list of the I/O Stream Library 
  1513. header files and the classes that they cover: 
  1514.  
  1515. o &iostreamH. contains declarations for the basic classes of the library: 
  1516.  
  1517.    - streambuf 
  1518.    - ios 
  1519.    - istream 
  1520.    - istreamwithassign 
  1521.    - ostream 
  1522.    - ostreamwithassign 
  1523.    - iostream 
  1524.    - iostreamwithassign 
  1525.  
  1526. o &fstreamH. contains declarations for the classes that deal with files: 
  1527.  
  1528.    - filebuf 
  1529.    - ifstream 
  1530.    - ofstream 
  1531.    - fstream 
  1532.  
  1533. o &stdiostrH. contains declarations for stdiobuf and &stdiostream., the classes 
  1534.   that specialize streambuf and ios, respectively, to use the FILE structures 
  1535.   defined in the C header file &stdioH. 
  1536.  
  1537. o &strstreaH. contains declarations for the classes that deal with character 
  1538.   strings. The "str" in these names stands for "string": 
  1539.  
  1540. o &strstreaH. 
  1541.  
  1542.    - istrstream 
  1543.    - ostrstream 
  1544.    - strstream 
  1545.    - strstreambuf 
  1546.  
  1547. o &iomanipH. contains declarations for the parameterized manipulators. 
  1548.   Manipulators are values that you can insert into streams or extract from 
  1549.   streams to affect or query the behaviour of the streams. 
  1550.  
  1551. o &streamH. is used for compatibility with earlier versions of the I/O Stream 
  1552.   Library. It includes &iostreamH., fstreamh., &stdiostrH., and &iomanipH., 
  1553.   along with some definitions needed for compatibility with the AT&T C++ 
  1554.   Language System Release 1.2. Only use this header file with existing code; do 
  1555.   not use it with new C++ code. 
  1556.  
  1557.  
  1558. ΓòÉΓòÉΓòÉ 6.5. Predefined Streams ΓòÉΓòÉΓòÉ
  1559.  
  1560. In addition to giving you the facilities to define your own streams for input 
  1561. and output, the I/O Stream Library also provides the following predefined 
  1562. streams: 
  1563.  
  1564. o &cin. is the standard input stream 
  1565.  
  1566. o &cerr. is the standard error stream but unlike the output to &cerr., the 
  1567.   output to &clog. is buffered. 
  1568.  
  1569. The predefined streams are initialized before the constructors for any static 
  1570. objects are called. You can use the predefined streams in the constructors for 
  1571. static objects. See "Specifying the Initialization Order of Global and File 
  1572. Static Constructors and Destructors" in the &BLug. for more information on the 
  1573. initialization of the predefined streams. 
  1574.  
  1575. The predefined streams &cin., &cerr., and &clog. are tied  to &cout.. As a 
  1576. result, if you use &cin., &cerr., or &clog., &cout. is flushed. That is, the 
  1577. contents of &cout. are sent to their ultimate consumer. 
  1578.  
  1579.  
  1580. ΓòÉΓòÉΓòÉ 6.6. Anonymous Streams ΓòÉΓòÉΓòÉ
  1581.  
  1582. An anonymous stream is a stream that is created as a temporary object. Because 
  1583. it is a temporary object, an anonymous stream has a const type modifier and is 
  1584. not a modifiable lvalue. Unlike the AT&T C++ Language System Release 2.1., the 
  1585. &cxxcompl. does not allow a non-const reference argument to be matched with a 
  1586. temporary object. User-defined input and output operators usually accept a 
  1587. non-const reference (such as a reference to an istream or ostream object) as an 
  1588. argument. Such an argument cannot be initialized by an anonymous stream, and 
  1589. thus an attempt to use an anonymous stream as an argument to a user-defined 
  1590. input or output operator will usually result in a compile-time error. 
  1591.  
  1592. In the following example, an object of the class Circle (defined in Input and 
  1593. Output for User-Defined Classes) is declared, and the value of an anonymous 
  1594. stream is assigned to it using the input operator. This statement causes a 
  1595. compile-time error: 
  1596.  
  1597. Circle c;
  1598. istrstream("10 15") >> c;
  1599.  
  1600.  
  1601. ΓòÉΓòÉΓòÉ 6.7. Stream Buffers ΓòÉΓòÉΓòÉ
  1602.  
  1603. One of the most important concepts in the I/O Stream Library is the stream 
  1604. buffer. The streambuf class implements some of the member functions that define 
  1605. stream buffers, but other specialized member functions are left to the classes 
  1606. that are derived from streambuf: strstreambuf, stdiobuf, and filebuf. 
  1607.  
  1608. Note:  In the AT&T and UNIX System Laboratories C++ Language System 
  1609. documentation, the terms reserve area and buffer are used instead of stream 
  1610. buffer. 
  1611.  
  1612.  
  1613. ΓòÉΓòÉΓòÉ 6.7.1. What Does a Stream Buffer Do? ΓòÉΓòÉΓòÉ
  1614.  
  1615. A stream buffer acts as a buffer between the ultimate producer (the source of 
  1616. data) or ultimate consumer (the target of data) and the member functions of the 
  1617. classes derived from ios that format this raw data. The ultimate producer can 
  1618. be a file, a device, or an array of bytes in memory. The ultimate consumer can 
  1619. also be a file, a device, or an array of bytes in memory. 
  1620.  
  1621.  
  1622. ΓòÉΓòÉΓòÉ 6.7.2. Why Use a Stream Buffer? ΓòÉΓòÉΓòÉ
  1623.  
  1624. In most operating systems, a system call to read data from the ultimate 
  1625. producer or write it to the ultimate consumer is an expensive operation. If 
  1626. your applications can reduce the number of system calls they have to make, they 
  1627. will usually be more efficient.  By acting as a buffer between the ultimate 
  1628. producer or ultimate consumer and the formatting functions, a stream buffer can 
  1629. reduce the number of system calls that are made. 
  1630.  
  1631. Consider, for example, an application that is reading data from the ultimate 
  1632. producer. If there is no buffer, the application has to make a system call for 
  1633. each character that is read. However, if the application uses a stream buffer, 
  1634. system calls will only be made when the buffer is empty. Each system call will 
  1635. read enough characters from the ultimate producer (if they are available) to 
  1636. fill the buffer again. 
  1637.  
  1638.  
  1639. ΓòÉΓòÉΓòÉ 6.7.3. How Is a Stream Buffer Implemented? ΓòÉΓòÉΓòÉ
  1640.  
  1641. A stream buffer is implemented as an array of bytes. For each stream buffer, 
  1642. pointers are defined that point to elements in this array to define the get 
  1643. area, or the space that is available to accept bytes from the ultimate 
  1644. producer, and the put area, or the space that is available to store bytes that 
  1645. are on their way to the ultimate consumer. 
  1646.  
  1647. A stream buffer does not necessarily have separate get and put areas. A stream 
  1648. buffer that is used for input, such as one that is attached to an istream 
  1649. object, has a get area. A stream buffer that is used for output, such as one 
  1650. that is attached to an ostream object, has a put area. A stream buffer that is 
  1651. used for both input and output, such as one that is attached to an iostream 
  1652. object, has both a get area and a put area. In stream buffers implemented by 
  1653. the filebuf class that are specialized to use files as a ultimate producer or 
  1654. ultimate consumer, the get and put areas overlap. 
  1655.  
  1656. The following member functions of the streambuf class return pointers to 
  1657. boundaries of areas in a stream buffer: 
  1658.  
  1659. o base() returns a pointer to the beginning of the stream buffer. 
  1660. o eback() returns a pointer to the beginning of the space available for 
  1661.   putback. Characters that are putback are returned to the get area of the 
  1662.   stream buffer. 
  1663. o gptr() returns the get pointer, a pointer to the beginning of the get area. 
  1664.  
  1665.      The space between gptr()
  1666.   and egptr() has been filled by the ultimate producer. These characters are 
  1667.   waiting to be extracted from the stream buffer. The space between  eback() 
  1668.   and gptr() is available for putback. 
  1669. o egptr() returns a pointer to the end of the get area. 
  1670. o pbase() returns a pointer to the beginning of the space available for the put 
  1671.   area. 
  1672. o pptr() returns the put pointer, a pointer to the beginning of the put area. 
  1673.   The space between pbase() and pptr() is filled with bytes that are waiting to 
  1674.   be sent to the ultimate consumer. The space between pptr() and epptr() is 
  1675.   available to accept characters from the application program that are on their 
  1676.   way to the ultimate consumer. 
  1677. o epptr() returns a pointer to the end of the put area. 
  1678. o ebuf() returns a pointer to the end of the stream buffer. 
  1679.  
  1680. Note:  In the actual implementation of stream buffers, the pointers returned by 
  1681. these functions point at char values. In the abstract concept of stream 
  1682. buffers, on the other hand, these pointers point to the boundary between char 
  1683. values. To establish a correspondence between the abstract concept and the 
  1684. actual implementation, you should think of the pointers as pointing just before 
  1685. the character that they actually point at. 
  1686.  
  1687. How Is a Stream Buffer Implemented? shows how the pointers returned by these 
  1688. functions delineate the stream buffer. 
  1689.  
  1690.  
  1691.  
  1692. Artwork from Interleaf needs to be redrawn or included
  1693. from anencapsulated poststript file.
  1694.  
  1695.  
  1696. ΓòÉΓòÉΓòÉ 7. Chapter 7. Protected Interface for streambuf Class ΓòÉΓòÉΓòÉ
  1697.  
  1698. This chapter describes the protected interface of the streambuf class. The 
  1699. protected interface consists of the member functions of streambuf that you need 
  1700. to use in order to derive your own classes from streambuf.  See "What Is the 
  1701. streambuf Protected Interface" below for more details. 
  1702.  
  1703. The streambuf class implements the concept of stream buffers. A stream buffer 
  1704. acts as a buffer between the ultimate producer or ultimate consumer of data and 
  1705. the member functions of the classes derived from ios (such as istream and 
  1706. ostream) that format this data. See "Stream Buffers" on page .* From heading: 
  1707. "Stream  Buffers" Stream Buffers for a more detailed description of stream 
  1708. buffers. 
  1709.  
  1710. The following topics are described in this chapter: 
  1711.  
  1712. o What is the streambuf protected interface? 
  1713. o Declarations for the streambuf protected interface in iostream.h 
  1714. o Examining pointers in the protected interface 
  1715. o Setting pointers in the protected interface 
  1716. o Other non-virtual members 
  1717. o Virtual member functions 
  1718.  
  1719. You can also return to the table of contents. 
  1720.  
  1721.  
  1722. ΓòÉΓòÉΓòÉ 7.1. What Is the streambuf Protected Interface? ΓòÉΓòÉΓòÉ
  1723.  
  1724. Although streambuf is not defined as a virtual base class, you can think of it 
  1725. as one.  You should not create objects of the streambuf class itself, but you 
  1726. can use it in the following ways: 
  1727.  
  1728. o As a base class to implement your own specialized strea streambuf as a 
  1729.   virtual base class. 
  1730.  
  1731.      The streambuf class only provides the basic
  1732.   buffer. The  filebuf , strstreambuf , and stdiobuf  classes conta the 
  1733.   standard ultimate consumers and producers. If you want to perform more 
  1734.   sophisticated operations, or if you want to use other ultimate consumers and 
  1735.   ultimate producers, you will have to create your own class derived from 
  1736.   streambuf. This chapter describes the members of the streambuf class that you 
  1737.   need to know about if you want to create a class derived from streambuf. 
  1738.   Collectively, these members are called the protected interface of the stream 
  1739.  
  1740. o Through a pre-defined class derived from streambuf. 
  1741.  
  1742.      This
  1743.   use of the streambuf class is described in Chapter 8, "streambuf Public 
  1744.   Interface"  on page -- Reference nD2360mrya not found --. 
  1745.  
  1746.   There are two kinds of functions in the protected interface described in this 
  1747.   chapter: 
  1748.  
  1749.    - Non-virtual member functions manipulate streambuf objects at a level of 
  1750.      detail that interface. 
  1751.  
  1752.    - Virtual member functions, which permit that you derive from streambuf to 
  1753.      customize their operations depending on the ultimate producer or utimate 
  1754.      consumer. When you define the virtual functions in your derived classes, 
  1755.      you must ensure that these definitions fulfill the conditions stated in 
  1756.      the descriptions of the virtual functions. If your definitions of the 
  1757.      virtual functions do not fulfill these conditions, objects of the derived 
  1758.      class may have unspecified behaviour.  Although most virtual functions are 
  1759.      declared as public members, they are described with the protected 
  1760.      interface (with the exception of the destructor for the streambuf class) 
  1761.      because they are meant to be overridden in the classes 
  1762.  
  1763.  
  1764. ΓòÉΓòÉΓòÉ 7.2. Declarations for the streambuf Protected Interface in iostream.h ΓòÉΓòÉΓòÉ
  1765.  
  1766. You must include the following statement in any file that uses the streambuf 
  1767. protected interface: 
  1768.  
  1769. #include <iostream.h>
  1770.  
  1771. The following is an excerpt from the iostream.h header file that shows the 
  1772. relevant declarations for the protected interface of streambuf. Note that this 
  1773. excerpt only shows the declarations in the streambuf class that are relevant to 
  1774. the protected interface. The declarations for the public interface are listed 
  1775. in "Declarations for the streambuf Public Interface in iostream.h " on page 
  1776. Declarations for the streambuf Public Interface in iostream.h. 
  1777.  
  1778. class ios {
  1779. public:
  1780. :tab.enum io_state:tab.{ goodbit, eofbit, failbit, badbit,
  1781. :tab.:tab.:tab.:tab.hardfail};
  1782. :tab.enum open_mode:tab.{ in, out, ate, app, trunc,
  1783. :tab.:tab.:tab.:tab.nocreate, noreplace} ;
  1784. :tab.enum seek_dir:tab.{ beg, cur, end } ;
  1785. :tab.// .
  1786. :tab.// .
  1787. :tab.// .
  1788. };
  1789. class streambuf {
  1790. public:
  1791. :tab.void:tab.:tab.dbp();
  1792. :tab.virtual int:tab.overflow(int c = EOF);
  1793. :tab.virtual int:tab.underflow();
  1794. :tab.virtual int:tab.pbackfail(int c);
  1795. :tab.virtual int:tab.sync();
  1796. :tab.virtual streambuf* setbuf(char* p, int len);
  1797. :tab.streambuf*:tab.setbuf(unsigned char* p, int len);
  1798. :tab.streambuf*:tab.setbuf(char* p, int len, int count);
  1799. :tab.virtual streampos  seekoff(streamoff, seek_dir,
  1800. :tab.
  1801. :tab.:tab.int=ios::in|ios::out);
  1802. :tab.virtual streampos   seekpos(streampos,
  1803. :tab.:tab.:tab. int =
  1804. ios::in|ios::out);
  1805. :tab.virtual int:tab.xsgetn(char* s, int n);
  1806. :tab.virtual int:tab.xsputn(const char* s, int n);
  1807. protected:
  1808. :tab.char*:tab.:tab.base();
  1809. :tab.char*:tab.:tab.pbase();
  1810. :tab.char*:tab.:tab.pptr();
  1811. :tab.char*:tab.:tab.epptr();
  1812. :tab.char*:tab.:tab.gptr();
  1813. :tab.char*:tab.:tab.egptr();
  1814. :tab.char*:tab.:tab.eback();
  1815. :tab.char* :tab.:tab.ebuf();
  1816. :tab.int:tab.:tab.blen() const;
  1817. :tab.void:tab.:tab.setp(char*  p, char*  ep);
  1818. :tab.void:tab.:tab.setg(char*  eb,char*  g, char*  eg);
  1819. :tab.void:tab.:tab.pbump(int n);
  1820. :tab.void:tab.:tab.gbump(int n);
  1821. :tab.void:tab.:tab.setb(char* b, char* eb, int a = 0 );
  1822. :tab.int:tab.:tab.unbuffered() const;
  1823. :tab.void:tab.:tab.unbuffered(int unb);
  1824. :tab.int:tab.:tab.allocate();
  1825. :tab.virtual int :tab.doallocate();
  1826. };
  1827.  
  1828. Note:  xsgetn() and xsputn() are for the internal use of the I/O Stream 
  1829. Library. They are declared in iostream.h and listed above, but you should not 
  1830. use them directly. 
  1831.  
  1832.  
  1833. ΓòÉΓòÉΓòÉ 7.3. Functions That Return Pointers in the Protected Interface ΓòÉΓòÉΓòÉ
  1834.  
  1835. This section describes the functions in the protected interface of streambuf 
  1836. that return pointers to boundaries of areas in a stream buffer. 
  1837.  
  1838. Note:  The following descriptions assume that the functions are called as part 
  1839. of an object called dsb which is an object of a class that is derived from 
  1840. streambuf. 
  1841.  
  1842.  
  1843. ΓòÉΓòÉΓòÉ 7.3.1. base - Return Pointer to Beginning of Stream Buffer ΓòÉΓòÉΓòÉ
  1844.  
  1845. char* base();
  1846.  
  1847. base() returns a pointer to the first byte of the stream buffer. The stream 
  1848. buffer consists of the space between the pointer returned by base() and the 
  1849. pointer returned by ebuf(). 
  1850.  
  1851.  
  1852. ΓòÉΓòÉΓòÉ 7.3.2. eback - Return Pointer to Beginning of Putback Area ΓòÉΓòÉΓòÉ
  1853.  
  1854. char* eback();
  1855.  
  1856. eback() returns a pointer to the lower bound of the space available for the get 
  1857. area of dsb. The space between the pointer returned by eback() and the pointer 
  1858. returned by gptr() is available for putback . See "putback - Put Extracted 
  1859. Characters Back into Stream Buffer" on page putback - Put Extracted Characters 
  1860. Back into Stream Buffer for details on putback. 
  1861.  
  1862.  
  1863. ΓòÉΓòÉΓòÉ 7.3.3. ebuf - Return Pointer to End of Stream Buffer ΓòÉΓòÉΓòÉ
  1864.  
  1865. char* ebuf();
  1866.  
  1867. ebuf() returns a pointer to the byte after the last byte of the stream buffer. 
  1868.  
  1869.  
  1870. ΓòÉΓòÉΓòÉ 7.3.4. egptr - Return Pointer to End of Get Area ΓòÉΓòÉΓòÉ
  1871.  
  1872. char* egptr();
  1873.  
  1874. egptr() returns a pointer to the byte after the last byte of the get area of 
  1875. dsb. 
  1876.  
  1877.  
  1878. ΓòÉΓòÉΓòÉ 7.3.5. epptr - Return Pointer to End of Put Area ΓòÉΓòÉΓòÉ
  1879.  
  1880. char* epptr();
  1881.  
  1882. epptr() returns a pointer to the byte after the last byte of the put area of 
  1883. dsb. 
  1884.  
  1885.  
  1886. ΓòÉΓòÉΓòÉ 7.3.6. gptr - Return Pointer to Beginning of Get Area ΓòÉΓòÉΓòÉ
  1887.  
  1888. char* gptr();
  1889.  
  1890. gptr() returns a pointer to the first byte of the get area of dsb. The get area 
  1891. consists of the space between the pointer returned by gptr() and the pointer 
  1892. returned by egptr(). Characters are extracted from the stream buffer beginning 
  1893. at the character pointed to by gptr(). 
  1894.  
  1895.  
  1896. ΓòÉΓòÉΓòÉ 7.3.7. pbase - Return Pointer to Beginning of Space Availablefor Put Area ΓòÉΓòÉΓòÉ
  1897.  
  1898. char* pbase();
  1899.  
  1900. pbase() returns a pointer to the beginning of the space available for the put 
  1901. area of dsb. Characters between the pointer returned by pbase() and the pointer 
  1902. returned by pptr() have been stored in the stream buffer, but they have not 
  1903. been consumed by the ultimate consumer. 
  1904.  
  1905.  
  1906. ΓòÉΓòÉΓòÉ 7.3.8. pptr - Return Pointer to Beginning of Put Area ΓòÉΓòÉΓòÉ
  1907.  
  1908. char* pptr();
  1909.  
  1910. pptr() returns a pointer to the beginning of the put area of dsb. The put area 
  1911. consists of the space between the pointer returned by pptr() and the pointer 
  1912. returned by epptr(). 
  1913.  
  1914.  
  1915. ΓòÉΓòÉΓòÉ 7.4. Functions That Set Pointers in the Protected Interface ΓòÉΓòÉΓòÉ
  1916.  
  1917. This section describes the functions in the protected interface of streambuf 
  1918. that set the boundaries of areas in a stream buffer. The values of these 
  1919. boundaries are returned by the functions described in "Functions That Return 
  1920. Pointers in the Protected Interface" on page Functions That Return Pointers in 
  1921. the Protected Interface. 
  1922.  
  1923. Note:  The following descriptions assume that the functions are called as part 
  1924. of an object called dsb which is an object of a class that is derived from 
  1925. streambuf. 
  1926.  
  1927.  
  1928. ΓòÉΓòÉΓòÉ 7.4.1. setb - Set Boundaries of Stream Buffer ΓòÉΓòÉΓòÉ
  1929.  
  1930. void setb(char* b, char* eb, int
  1931. a = 0);
  1932.  
  1933. setb() sets the beginning of the stream buffer (the pointer returned by 
  1934. dsb.pbase()) to the position pointed to by b, and sets the end of the stream 
  1935. buffer (the pointer returned by dsb.ebuf()) to the position pointed to by eb. 
  1936. If a is a nonzero value, the stream buffer will be deleted when setb() is 
  1937. called again. If b and eb are both equal to 0, no stream buffer is established. 
  1938. If b is not equal to 0, a stream buffer is established, even if eb is less than 
  1939. b. If this is the case, the stream buffer has length zero. 
  1940.  
  1941.  
  1942. ΓòÉΓòÉΓòÉ 7.4.2. setp - Set Boundaries of Put Area ΓòÉΓòÉΓòÉ
  1943.  
  1944. void setp(char* p, char* ep);
  1945.  
  1946. setp() sets the beginning of the put area of dsb (the pointer returned by 
  1947. dsb.pptr()) to the position pointed to by p, and sets the end of the put area 
  1948. (the pointer returned by dsb.epptr()) to the position pointed to by ep. 
  1949.  
  1950.  
  1951. ΓòÉΓòÉΓòÉ 7.4.3. setg - Set Boundaries of Get Area ΓòÉΓòÉΓòÉ
  1952.  
  1953. void setg(char* eb, char* g, char*
  1954. eg);
  1955.  
  1956. setg() sets the beginning of the get area of dsb (the pointer returned by 
  1957. dsb.gptr()) to g, and sets the end of the get area (the pointer returned by 
  1958. dsb.egptr()) to eg. setg() also sets the beginning of the area available for 
  1959. putback (the pointer returned by dsb.eback()) to eb. 
  1960.  
  1961.  
  1962. ΓòÉΓòÉΓòÉ 7.5. Other Non-Virtual Member Functions in the Protected Interface ΓòÉΓòÉΓòÉ
  1963.  
  1964. This section describes the remaining non-virtual member functions that make up 
  1965. the protected interface of streambuf. 
  1966.  
  1967. Note:  The following descriptions assume that the functions are called as part 
  1968. of an object called dsb which is an object of a class that is derived from 
  1969. streambuf. 
  1970.  
  1971.  
  1972. ΓòÉΓòÉΓòÉ 7.5.1. allocate - Set Up a Stream Buffer ΓòÉΓòÉΓòÉ
  1973.  
  1974. int allocate();
  1975.  
  1976. allocate() attempts to set up a stream buffer. allocate() returns the following 
  1977. values: 
  1978.  
  1979. o 0 if dsb already has a stream buffer set up (that is, dsb->base() returns a 
  1980.   nonzero value), or if unbuffered()  (see "unbuffered - Buffering State" on 
  1981.   page .* From heading: "unbuffered - Buffering State" unbuffered - Buffering 
  1982.   State for more details) 
  1983.  
  1984.      returns a nonzero value.
  1985.      allocate() does not do any further processing
  1986.   if it returns 0. 
  1987. o 1 if allocate() does set up a stream buffer. 
  1988. o EOF if the attempt to allocate space for the stream buffer fails. 
  1989.  
  1990. allocate() is not called by any other non-virtual member function of streambuf. 
  1991.  
  1992.  
  1993. ΓòÉΓòÉΓòÉ 7.5.2. blen - Return Length of Stream Buffer ΓòÉΓòÉΓòÉ
  1994.  
  1995. int blen() const;
  1996.  
  1997. blen() returns the length (in bytes) of the stream buffer. 
  1998.  
  1999.  
  2000. ΓòÉΓòÉΓòÉ 7.5.3. dbp - Record Stream Buffer Status ΓòÉΓòÉΓòÉ
  2001.  
  2002. void dbp();
  2003.  
  2004. dbp() writes to standard output the values returned by the following functions: 
  2005.  
  2006. o base() 
  2007. o eback() 
  2008. o ebuf() 
  2009. o egptr() 
  2010. o epptr() 
  2011. o gptr() 
  2012. o pptr() 
  2013.  
  2014. dbp() is intended for debugging. 
  2015.  
  2016.  streambuf does not
  2017. specify anything about the form of the output. dbp() is considered part of the 
  2018. protected interface because the information that it prints can only be 
  2019. understood in relation to that interface. It is declared as a public function 
  2020. so that it can be called anywhere during debugging. 
  2021.  
  2022. The following example shows the output produced by dbp() when it is called as 
  2023. part of a filebuf object: 
  2024.  
  2025. #include <iostream.h>
  2026. void main()
  2027. {
  2028. :tab.cout << "Here is some sample output." <<
  2029. endl;
  2030. :tab.cout.rdbuf()->dbp();
  2031. }
  2032.  
  2033. If you compile and run this example, your output will look like this: 
  2034.  
  2035. Here is some sample output.
  2036. buf at 0x20048100, base=0x20049000, ebuf=0x20049400,
  2037. pptr=0x20049000,
  2038. epptr=0x20049400, eback=0x0, gptr=0x0, egptr=0x0
  2039.  
  2040.  
  2041. ΓòÉΓòÉΓòÉ 7.5.4. gbump - Move Beginning of Get Area ΓòÉΓòÉΓòÉ
  2042.  
  2043. void gbump(int n);
  2044.  
  2045. gbump() offsets the beginning of the get area by the value of n. The value of n 
  2046. can be positive or negative. gbump() does not check to see if the new value 
  2047. returned by gptr() is valid. 
  2048.  
  2049. The beginning of the get area is equal to the value returned by gptr() .  See 
  2050. "gptr - Return Pointer to Beginning of Get Area" on page gptr - Return Pointer 
  2051. to Beginning of Get Area for more details on gptr(). 
  2052.  
  2053.  
  2054. ΓòÉΓòÉΓòÉ 7.5.5. pbump - Move Beginning of Put Area ΓòÉΓòÉΓòÉ
  2055.  
  2056. void pbump(int n);
  2057.  
  2058. pbump() offsets the beginning of the put area by the value of n. The value of n 
  2059. can be positive or negative. pbump() does not check to see if the new value 
  2060. returned by pptr() is valid. 
  2061.  
  2062. The beginning of the put area  is equal to the value returned by pptr() . See 
  2063. "pptr - Return Pointer to Beginning of Put Area" on page pptr - Return Pointer 
  2064. to Beginning of Put Area for more details on pptr(). 
  2065.  
  2066.  
  2067. ΓòÉΓòÉΓòÉ 7.5.6. unbuffered - Buffering State ΓòÉΓòÉΓòÉ
  2068.  
  2069. int unbuffered() const;
  2070. void unbuffered(int n);
  2071.  
  2072. unbuffered() manipulates the private streambuf variable called the buffering 
  2073. state. If the buffering state is nonzero, a call to allocate()  does not set up 
  2074. a stream buffer. See "allocate - Set Up a Stream Buffer" on page .* From 
  2075. heading: "allocate - Set Up a Stream Buffer" allocate - Set Up a Stream Buffer 
  2076. for more details on allocate(). 
  2077.  
  2078. There are two versions of unbuffered(). The version of unbuffered() that takes 
  2079. no arguments returns the current value of the buffering state. The version that 
  2080. takes an argument, n, changes the value of the buffering state to n. 
  2081.  
  2082.  
  2083. ΓòÉΓòÉΓòÉ 7.6. Virtual Member Functions in the Protected Interface ΓòÉΓòÉΓòÉ
  2084.  
  2085. This section describes the virtual functions in the protected interface of 
  2086. streambuf.  Although these virtual functions have default definitions in 
  2087. streambuf, they can be overridden in classes that are derived from streambuf. 
  2088. The following descriptions state the default definition of each function and 
  2089. the expected behaviour for these functions in classes where they are 
  2090. overridden. 
  2091.  
  2092. Note:  The following descriptions assume that the functions are called as part 
  2093. of an object called dsb, which is an object of a class that is derived from 
  2094. streambuf. 
  2095.  
  2096.  
  2097. ΓòÉΓòÉΓòÉ 7.6.1. doallocate - Allocate Space for a Stream Buffer ΓòÉΓòÉΓòÉ
  2098.  
  2099. virtual int doallocate();
  2100.  
  2101. doallocate() is called when allocate()  determines that space is needed for a 
  2102. stream buffer. See "allocate - Set Up a Stream Buffer" on page allocate - Set 
  2103. Up a Stream Buffer for more details on allocate(). 
  2104.  
  2105. The default definition of doallocate() attempts to allocate space for a stream 
  2106. buffer using the operator new. 
  2107.  
  2108. If you define your own version of doallocate(), it must call setb() to provide 
  2109. space for a stream buffer or return EOF if it cannot allocate space. 
  2110. doallocate() should only be called if unbuffered()  and base()  return zero. 
  2111. See "unbuffered - Buffering State" on page .* From heading: "unbuffered - 
  2112. Buffering State" unbuffered - Buffering State for more details on unbuffered(). 
  2113.  
  2114.  See "base - Return Pointer to Beginning of Stream Buffer"
  2115. on page -- Reference h000389 not found -- for more details on base(). 
  2116.  
  2117.  
  2118. ΓòÉΓòÉΓòÉ 7.6.2. overflow -  Clear Put Area ΓòÉΓòÉΓòÉ
  2119.  
  2120. virtual int overflow(int c = EOF);
  2121.  
  2122. overflow() is  called when the put area is full, and an attempt is made to 
  2123. store another character in it. overflow() may be called at other times. 
  2124.  
  2125. The default definition of overflow() is compatible with the AT&T &nicecxx. 
  2126. Language System Release 1.2 
  2127.  
  2128.  version
  2129. of the stream package, but it is not considered part of the current I/O Stream 
  2130. Library. Thus, the default definition of overflow() should not be used, and 
  2131. every class derived from streambuf should define overflow() itself. 
  2132.  
  2133. The definition of overflow() in your classes derived from streambuf  should 
  2134. cause the ultimate consumer to consume the characters in the put area, call 
  2135. setp() to establish a new put area, and store the argument c in the put area if 
  2136. c does not equal EOF. overflow() should return EOF if an error occurs, and it 
  2137. should return a value not equal to EOF otherwise. 
  2138.  
  2139.  
  2140. ΓòÉΓòÉΓòÉ 7.6.3. pbackfail - Deal With Full Putback Area ΓòÉΓòÉΓòÉ
  2141.  
  2142. virtual int pbackfail(int c);
  2143.  
  2144. pbackfail() is called when the following conditions are true: 
  2145.  
  2146. o An attempt has been made to put back a character. 
  2147. o There is no room in the putback area. The pointer returned by eback() equals 
  2148.   the pointer returned by gptr()  . See "eback - Return Pointer to Beginning of 
  2149.   Putback Area" on page eback - Return Pointer to Beginning of Putback Area for 
  2150.   more details on eback(). 
  2151.  
  2152.       See "gptr - Return Pointer to Beginning of Get Area" on
  2153.   page gptr - Return Pointer to Beginning of Get Area for more details on 
  2154.   gptr(). 
  2155.  
  2156. The default definition of pbackfail() returns EOF. 
  2157.  
  2158. If you define pbackfail() in your own classes, your definition of pbackfail() 
  2159. should attempt to deal with the full putback area by, for instance, 
  2160. repositioning the get pointer of the ultimate producer. If this is possible, 
  2161. pbackfail() should return the argument c. If not, pbackfail() should return 
  2162. EOF. 
  2163.  
  2164.  
  2165. ΓòÉΓòÉΓòÉ 7.6.4. seekoff - Reposition External Get or Put Pointer ΓòÉΓòÉΓòÉ
  2166.  
  2167. virtual streampos seekoff(streamoff so, seek_dir
  2168. dir,
  2169. :tab.:tab.int mode =
  2170. ios::in|ios::out);
  2171.  
  2172. seekoff() repositions the get or put pointer of the ultimate producer or 
  2173. ultimate consumer. seekoff() does not change the values returned by dsb.gptr() 
  2174. or dsb.pptr(). 
  2175.  
  2176. The default  definition of seekoff() returns EOF. 
  2177.  
  2178. If you define your own seekoff() function, it should return EOF if the derived 
  2179. class does not support repositioning. If the class does support repositioning, 
  2180. seekoff() should return the new position of the affected pointer, or EOF if an 
  2181. error occurs. so is an offset from a position in the ultimate producer or 
  2182. ultimate consumer. dir is a position in the ultimate producer or ultimate 
  2183. consumer. dir can have the following values: 
  2184.  
  2185. o ios::beg:  the beginning of the ultimate producer or ultimate consumer 
  2186. o ios::cur:  the current position in the ultimate producer or ultimate consumer 
  2187. o ios::end:  the end of the ultimate producer or ultimate consumer. 
  2188.  
  2189. The new position of the affected pointer is the position specified by dir 
  2190. offset by the value of so. If you derive your own classes from streambuf, 
  2191. certain values of dir may not be valid depending on the nature of the ultimate 
  2192. consumer or producer. 
  2193.  
  2194. If ios::in is set in mode, the seekoff() should modify the get pointer. If 
  2195. ios::out is set in mode, the put pointer should be modified. If both ios::in 
  2196. and ios::out are set, both the get pointer and the put pointer should be 
  2197. modified. 
  2198.  
  2199.  
  2200. ΓòÉΓòÉΓòÉ 7.6.5. seekpos - Reposition External Get or Put Pointer ΓòÉΓòÉΓòÉ
  2201.  
  2202. virtual streampos seekpos(streampos pos,
  2203. :tab.:tab.int mode =
  2204. ios::in|ios::out);
  2205.  
  2206. seekpos() repositions the get or put pointer of the ultimate producer or 
  2207. ultimate consumer to the position pos. If ios::in is set in mode, the get 
  2208. pointer is repositioned. If ios::out is set in mode, the put pointer is 
  2209. repositioned. If both ios::in and ios::out are set, both the get pointer and 
  2210. the put pointer are affected. seekpos() does not change the values returned by 
  2211. dsb.gptr() or dsb.pptr(). 
  2212.  
  2213. The default definition of seekpos() returns the return value of the function 
  2214. seekoff(streamoff(pos), ios::beg, mode). Thus, if you want to define seeking 
  2215. operations in a class derived from streambuf, you can define seekoff() and use 
  2216. the default definition of seekpos(). 
  2217.  
  2218. If you define seekpos() in a class derived from streambuf, seekpos() should 
  2219. return EOF if the class does not support repositioning or if pos points to a 
  2220. position equal to or greater than the end of the stream. If not, seekpos() 
  2221. should return pos. 
  2222.  
  2223.  
  2224. ΓòÉΓòÉΓòÉ 7.6.6. setbuf - Set Up Stream Buffer ΓòÉΓòÉΓòÉ
  2225.  
  2226. virtual streambuf* setbuf(char* ptr, int
  2227. len);
  2228. streambuf* setbuf(unsigned char* ptr, int
  2229. len);
  2230. streambuf* setbuf(char* ptr, int len,
  2231. int count);
  2232.  
  2233. There are three versions of setbuf(). The two versions that take two arguments 
  2234. set up a stream buffer consisting of the array of bytes starting at ptr with 
  2235. length len. The version of setbuf() that takes three arguments is obsolete. 
  2236.  
  2237.  The I/O
  2238. Stream Library includes it to be compatible with AT&T &nicecxx. Language System 
  2239. Release 1.2. 
  2240.  
  2241. The default definition of setbuf() sets up the stream buffer if the streambuf 
  2242. object does not already have a stream buffer. 
  2243.  
  2244. If you define setbuf() in a class derived from streambuf, setbuf() can either 
  2245. accept or ignore a request for an unbuffered streambuf object. The call to 
  2246. setbuf() is a request for an unbuffered streambuf object if ptr equals 0 or len 
  2247. equals 0. setbuf() should return a pointer to sb if it accepts the request, and 
  2248. 0 otherwise. 
  2249.  
  2250.  
  2251. ΓòÉΓòÉΓòÉ 7.6.7. sync - Synchronize Stream Buffer and Ultimate Produceror Ultimate Consumer ΓòÉΓòÉΓòÉ
  2252.  
  2253. virtual int sync();
  2254.  
  2255. sync() synchronizes the stream buffer with the ultimate producer or the 
  2256. ultimate consumer. 
  2257.  
  2258. The default definition of sync() returns 0 if either of the following 
  2259. conditions is true: 
  2260.  
  2261. o The get area is empty and there are no characters waiting to go to the 
  2262.   ultimate consumer 
  2263. o No stream buffer has been allocated for sb. 
  2264.  
  2265. Otherwise, sync() returns EOF. 
  2266.  
  2267. If you define sync() in a class derived from streambuf, it should send any 
  2268. characters that are stored in the put area to the ultimate consumer, and (if 
  2269. possible) send any characters that are waiting in the get area back to the 
  2270. ultimate producer. When sync() returns, both the put area and the get area 
  2271. should be empty. sync() should return EOF if an error occurs. 
  2272.  
  2273.  
  2274. ΓòÉΓòÉΓòÉ 7.6.8. underflow - Fill Get Area ΓòÉΓòÉΓòÉ
  2275.  
  2276. virtual int underflow();
  2277.  
  2278. underflow() takes characters from the ultimate producer and puts them in the 
  2279. get area. 
  2280.  
  2281. The default definition of underflow() is compatible with the AT&T &nicecxx. 
  2282. Language System Release 1.2 
  2283.  
  2284.  version
  2285. of the stream package, but it is not considered part of the current I/O Stream 
  2286. Library. Thus, the default definition of underflow() should not be used, and 
  2287. every class derived from streambuf should define underflow() itself. 
  2288.  
  2289. If you define underflow() in a class derived from streambuf, it should return 
  2290. the first character in the get area if the get area is not empty. If the get 
  2291. area is empty, underflow() should create a get area that is not empty and 
  2292. return the next character. If no more characters are available in the ultimate 
  2293. producer, underflow() should return EOF and leave the get area empty. 
  2294.  
  2295. ********** 
  2296.  
  2297.  
  2298. ΓòÉΓòÉΓòÉ 8. Chapter 8. streambuf Public Interface ΓòÉΓòÉΓòÉ
  2299.  
  2300. This chapter describes the public interface of the streambuf class. The public 
  2301. interface consists of the public member functions of streambuf that give you 
  2302. direct access to the pre-defined classes that are derived from streambuf. See 
  2303. "What Is the Public Interface?" below for more details. 
  2304.  
  2305. The streambuf class implements the concept of stream buffers. A stream buffer 
  2306. acts as a buffer between the source or target of data and the member functions 
  2307. of the classes derived from ios (such as istream and ostream) that format this 
  2308. data. See Stream Buffers for a more detailed description of stream buffers. 
  2309.  
  2310. The following topics are described in this chapter: 
  2311.  
  2312. o What Is the streambuf Public Interface 
  2313. o Declarations for the streambuf public interface in &iostreamH. 
  2314. o Public members of the streambuf public interface. 
  2315.  
  2316. You can also return to the table of contents. 
  2317.  
  2318.  
  2319. ΓòÉΓòÉΓòÉ 8.1. What Is the streambuf Public Interface? ΓòÉΓòÉΓòÉ
  2320.  
  2321. Although streambuf is not defined as a virtual base class, you can think of it 
  2322. as one.  You should not create objects of the streambuf class itself, but you 
  2323. can use it in the following ways: 
  2324.  
  2325. o Through a predefined class derived from streambuf. You can use objects of 
  2326.   filebuf, strstreambuf, and stdiobuf (the predefined classes that are derived 
  2327.   from streambuf) directly as implementations of stream buffers. The public 
  2328.   interface consists of the streambuf public member functions that can be 
  2329.   called on objects of these predefined classes. This chapter describes the 
  2330.   members of the streambuf class that you need to know about if you want to use 
  2331.   the predefined classes derived from streambuf to implement stream buffers 
  2332.   directly. streambuf itself does not have any facilities for taking characters 
  2333.   from the ultimate producer or sending them to the ultimate consumer. The 
  2334.   specialized member functions that handle the interface with the ultimate 
  2335.   producer and the ultimate consumer are defined in the  filebuf, strstreambuf, 
  2336.   and stdiobuf classes. 
  2337.  
  2338. o As a base class to implement your own specialized stream buffers. This use of 
  2339.   the streambuf class is described in -- Reference gE2220mrya not found --. 
  2340.  
  2341. o Through a predefined class derived from streambuf. You can use objects of 
  2342.   filebuf strstreambuf, and stdiobuf (the predefined classes that are derived 
  2343.   from streambuf) directly as implementations of stream buffers. The public 
  2344.   interface consists of the streambuf public member functions that can be 
  2345.   called on objects of these predefined classes. This chapter describes the 
  2346.   members of the streambuf class that you need to know about if you want to use 
  2347.   the predefined classes derived from streambuf to implement stream buffers 
  2348.   directly. streambuf itself does not have any facilities for taking characters 
  2349.   from the ultimate producer or sending them to the ultimate consumer. The 
  2350.   specialized member functions that handle the interface with the ultimate 
  2351.   producer and the ultimate consumer are defined in the  filebuf, strstreambuf, 
  2352.   and stdiobuf classes. 
  2353.  
  2354.   Except for the destructor for the streambuf class, the virtual functions are 
  2355.   described as part of the protected interface. Although most virtual functions 
  2356.   are declared public, they are meant to be overloaded in the classes that you 
  2357.   derive from streambuf, and thus they are part of the protected interface. 
  2358.  
  2359.  
  2360. ΓòÉΓòÉΓòÉ 8.2. Declarations for the streambuf Public Interface in iostream.h ΓòÉΓòÉΓòÉ
  2361.  
  2362. You must include the following statement in any file that uses member functions 
  2363. of the public interface of streambuf: 
  2364.  
  2365. #include <iostream.h>
  2366.  
  2367. The following is an excerpt from the &iostreamH. header file that shows the 
  2368. relevant declarations for the members of the public interface. Note that this 
  2369. excerpt only shows the declarations in the streambuf class that are relevant to 
  2370. the public interface. The declarations for the protected interface are listed 
  2371. in Declarations for the streambuf Protected Interface in iostream.h. 
  2372.  
  2373. class ios {
  2374. public:
  2375.      enum io_state     { goodbit, eofbit, failbit, badbit,
  2376.                          hardfail};
  2377.      enum open_mode    { in, out, ate, app, trunc,
  2378.                          nocreate, noreplace} ;
  2379.      enum seek_dir     { beg, cur, end} ;
  2380.      // .
  2381.      // .
  2382.      // .
  2383. };
  2384.  
  2385. class streambuf {
  2386. public :
  2387.                streambuf();
  2388.                streambuf(char*  p, int l);
  2389.                streambuf(char*  p, int l,int c);
  2390.      virtual   ~streambuf();
  2391.      int       in_avail();
  2392.      int       out_waiting();
  2393.      int       sgetc();
  2394.      int       snextc();
  2395.      int       sbumpc();
  2396.      void      stossc();
  2397.      int       sputbackc(char c);
  2398.      int       sputc(int c);
  2399.      int       sputn(const char*  s,int n);
  2400.      int       sgetn(char*  s,int n);
  2401.      virtual   streambuf* setbuf(char*  p, int len);
  2402.      streambuf*  setbuf(unsigned char*  p, int len);
  2403.      streambuf*  setbuf(char*  p, int len, int count);
  2404.      int       optim_in_avail();
  2405.      int       optim_sbumpc();
  2406.      int       pptr_non_null();
  2407. };
  2408.  
  2409.  1. pptr_non_null(), optim_in_avail(), and optim_sbumpc() are internal 
  2410.     implementation functions. They are declared in &iostreamH. and listed 
  2411.     above, but you should not use them directly. 
  2412.  
  2413.  2. Because setbuf() has both virtual and non-virtual declarations, it is 
  2414.     described as part of the protected interface. See setbuf - Set Up Stream 
  2415.     Buffer for more details. 
  2416.  
  2417.  
  2418. ΓòÉΓòÉΓòÉ 8.3. Public Members of the streambuf Public Interface ΓòÉΓòÉΓòÉ
  2419.  
  2420. Note:  The following descriptions assume that the functions are called as part 
  2421. of an object fb of a class derived from streambuf. fb could, for example, be an 
  2422. object of the class filebuf. It could also be an strstreambuf object or an 
  2423. stdiobuf object. 
  2424.  
  2425.  
  2426. ΓòÉΓòÉΓòÉ 8.3.1. Constructors for streambuf ΓòÉΓòÉΓòÉ
  2427.  
  2428. streambuf();
  2429. streambuf(char* p, int len);
  2430. streambuf(char* p, int len, int c);
  2431.  
  2432. There are three versions of the constructor for streambuf. The version with no 
  2433. arguments constructs an empty stream buffer corresponding to an empty sequence. 
  2434. The values returned by base(), eback(), ebuf(), egptr(), epptr(), pptr(), 
  2435. gptr(), and pbase() are initially all zero for this stream buffer. 
  2436.  
  2437. The version with two arguments constructs an empty stream buffer of length len 
  2438. starting at the position pointed to by p. 
  2439.  
  2440. The version of the constructor with three arguments is obsolete. It is included 
  2441. in the I/O Stream Library for compatibility with the AT&T C++ Language System 
  2442. Release 1.2. 
  2443.  
  2444.  
  2445. ΓòÉΓòÉΓòÉ 8.3.2. Destructor for streambuf ΓòÉΓòÉΓòÉ
  2446.  
  2447. virtual ~streambuf();
  2448.  
  2449. The destructor for streambuf calls sync(). If a stream buffer has been set up 
  2450. and ios::colon.::colon.alloc is set, sync() deletes the stream buffer. See sync 
  2451. - Synchronize Stream Buffer and Ultimate Produceror Ultimate Consumer for more 
  2452. details on sync(). 
  2453.  
  2454.  
  2455. ΓòÉΓòÉΓòÉ 8.3.3. in_avail - Return Number of Characters in Get Area ΓòÉΓòÉΓòÉ
  2456.  
  2457. int in_avail();
  2458.  
  2459. in_avail() returns the number of characters that are available to be extracted 
  2460. from the get area of fb. You can extract the number of characters equal to the 
  2461. value that in_avail() returns without causing an error. 
  2462.  
  2463.  
  2464. ΓòÉΓòÉΓòÉ 8.3.4. out_waiting - Return Number of Characters in Put Area ΓòÉΓòÉΓòÉ
  2465.  
  2466. int out_waiting();
  2467.  
  2468. out_waiting() returns the number of characters that are in the put area waiting 
  2469. to be sent to the ultimate consumer. 
  2470.  
  2471.  
  2472. ΓòÉΓòÉΓòÉ 8.3.5. sbumpc - Move Get Pointer One Character ΓòÉΓòÉΓòÉ
  2473.  
  2474. int sbumpc();
  2475.  
  2476. sbumpc() moves the get pointer past one character and returns the character 
  2477. that it moved past. sbumpc() returns EOF if the get pointer is already at the 
  2478. end of the get area. 
  2479.  
  2480.  
  2481. ΓòÉΓòÉΓòÉ 8.3.6. sgetc - Return Character After Get Pointer ΓòÉΓòÉΓòÉ
  2482.  
  2483. int sgetc();
  2484.  
  2485. sgetc() returns the character after the get pointer without moving the get 
  2486. pointer itself. If no character is available, sgetc() returns EOF. 
  2487.  
  2488. Note:  sgetc() does not change the position of the get pointer. 
  2489.  
  2490.  
  2491. ΓòÉΓòÉΓòÉ 8.3.7. sgetn - Return Characters Following Get Pointer ΓòÉΓòÉΓòÉ
  2492.  
  2493. int sgetn(char* ptr, int n);
  2494.  
  2495. sgetn() extracts the n characters following the get pointer, and copies them to 
  2496. the area starting at the position pointed to by ptr. If there are fewer than n 
  2497. characters following the get pointer, sgetn() takes the characters that are 
  2498. available and stores them in the position pointed to by ptr. sgetn() 
  2499. repositions the get pointer following the extracted characters and returns the 
  2500. number of extracted characters. 
  2501.  
  2502.  
  2503. ΓòÉΓòÉΓòÉ 8.3.8. snextc - Return Character Following Get Pointer ΓòÉΓòÉΓòÉ
  2504.  
  2505. int snextc();
  2506.  
  2507. snextc() moves the get pointer forward one character and returns the character 
  2508. following the new position of the get pointer. snextc() returns EOF if the get 
  2509. pointer is at the end of the get area either before or after it is moved 
  2510. forward. 
  2511.  
  2512.  
  2513. ΓòÉΓòÉΓòÉ 8.3.9. sputbackc - Move Get Pointer Back One Character ΓòÉΓòÉΓòÉ
  2514.  
  2515. int sputbackc(char c);
  2516.  
  2517. sputbackc() moves the get pointer back one character. The get pointer may 
  2518. simply move, or the ultimate producer may rearrange the internal data 
  2519. structures so that the character c is saved. The argument c must equal the 
  2520. character that precedes the get pointer in the stream buffer. The effect of 
  2521. sputbackc() is undefined if c is not equal to the character before the get 
  2522. pointer. sputbackc() returns EOF if an error occurs. The conditions that cause 
  2523. errors depend on the derived class. 
  2524.  
  2525.  
  2526. ΓòÉΓòÉΓòÉ 8.3.10. sputc - Store Character After Put Pointer ΓòÉΓòÉΓòÉ
  2527.  
  2528. int sputc(int c);
  2529.  
  2530. sputc() stores the argument c after the put pointer and moves the put pointer 
  2531. past the stored character. If there is enough space in the stream buffer, this 
  2532. will extend the size of the put area. sputc() returns EOF if an error occurs. 
  2533. The conditions that cause errors depend on the derived class. 
  2534.  
  2535.  
  2536. ΓòÉΓòÉΓòÉ 8.3.11. sputn - Store Characters After Put Pointer ΓòÉΓòÉΓòÉ
  2537.  
  2538. int sputn(const char* s, int n);
  2539.  
  2540. sputn() stores the n characters starting at s after the put pointer and moves 
  2541. the put pointer to the end of the series. sputn() returns the number of 
  2542. characters successfully stored. If an error occurs, sputn() returns a value 
  2543. less than n. 
  2544.  
  2545.  
  2546. ΓòÉΓòÉΓòÉ 8.3.12. stossc - Move Get Pointer Forward One Character ΓòÉΓòÉΓòÉ
  2547.  
  2548. void stossc();
  2549.  
  2550. stossc() moves the get pointer forward one character. If the get pointer is 
  2551. already at the end of the get area, stossc() does not move it. 
  2552.  
  2553.  
  2554. ΓòÉΓòÉΓòÉ 9. Chapter 9. ios Class ΓòÉΓòÉΓòÉ
  2555.  
  2556. The ios class maintains the error and format state information for the classes 
  2557. that are derived from it.  See The I/O Stream Library Class Hierarchy for a 
  2558. list of these classes. The derived classes support the movement of formatted 
  2559. and unformatted data to and from the stream buffer. This chapter describes the 
  2560. members of the ios class, and thus describes the operations that are common to 
  2561. all the classes that are derived from ios. 
  2562.  
  2563. The following topics are described in this chapter: 
  2564.  
  2565. o The error state and the format state 
  2566. o Declarations for ios in the &iostreamH. header file 
  2567. o Constructors and assignment operator for ios 
  2568. o The format state and the error state 
  2569. o Format state variables 
  2570. o Format state flags 
  2571. o Public members of ios for the format state 
  2572. o Public members of ios for user-defined format flags 
  2573. o Public members of ios for the error state 
  2574. o Other ios member functions 
  2575. o Built-in manipulators 
  2576.  
  2577. You can also return to the table of contents. 
  2578.  
  2579.  
  2580. ΓòÉΓòÉΓòÉ 9.1. Declarations for ios in the iostream.h Header File ΓòÉΓòÉΓòÉ
  2581.  
  2582. You must include the following statement in any file that uses members of the 
  2583. ios class: 
  2584.  
  2585. #include <iostream.h>
  2586.  
  2587. The following is an excerpt from the &iostreamH. header file that shows the 
  2588. relevant declarations for the members of ios. 
  2589.  
  2590. Note:  In the following excerpt, the values of the enumerators have been 
  2591. omitted. Look at the &iostreamH. header file if you need to use these values 
  2592. explicitly. 
  2593.  
  2594. class ios {
  2595. public:
  2596.      enum io_state     {goodbit, eofbit, failbit, badbit,
  2597.                         hardfail};
  2598.      enum open_mode    {in, out, ate, app, trunc,
  2599.                         nocreate, noreplace};
  2600.      enum seek_dir     {beg, cur, end } ;
  2601.      enum              {skipws,
  2602.                        left, right, internal,
  2603.                        dec, oct, hex,
  2604.                        showbase,
  2605.                        showpoint,
  2606.                        uppercase,
  2607.                        showpos,
  2608.                        scientific, fixed,
  2609.                        unitbuf, stdio
  2610.                        };
  2611.                  ios(streambuf*);
  2612.      virtual     ~ios() ;
  2613.      static const long
  2614.                   basefield; /* dec|oct|hex */
  2615.      static const long
  2616.                   adjustfield; /* left|right|internal */
  2617.      static const long
  2618.                   floatfield; /* scientific|fixed */
  2619.      long         flags() const;
  2620.      long         flags(long f);
  2621.      long         setf(long newset, long field);
  2622.      long         setf(long);
  2623.      long         unsetf(long)
  2624.      int          width() const;
  2625.      int          width(int w);
  2626.      ostream*     tie(ostream* s);
  2627.      ostream*     tie();
  2628.      char         fill(char);
  2629.      char         fill() const;
  2630.      int          precision(int);
  2631.      int          precision() const;
  2632.      int          rdstate() const;
  2633.                   operator void*();
  2634.                   operator const void*() const;
  2635.      int          operator!() const;
  2636.      int          eof() const;
  2637.      int          fail() const;
  2638.      int          bad() const;
  2639.      int          good() const;
  2640.      void         clear(int i =0);
  2641.      streambuf*   rdbuf();
  2642.      long &       iword(int);
  2643.      void* &      pword(int);
  2644.      static long  bitalloc()
  2645.      static int   xalloc();
  2646.      static void  sync_with_stdio();
  2647.      int          skip(int i);
  2648. protected:
  2649.                   ios();
  2650.      void         init(streambuf* isb);
  2651.      ostream*     x_tie;
  2652.      short        x_precision;
  2653.      char         x_fill;
  2654.      short        x_width;
  2655. private:
  2656.                   ios(ios& ioa);
  2657.      void          operator=(ios& iob);
  2658. };
  2659.  
  2660. ios& dec(ios&);
  2661. ios& hex(ios&);
  2662. ios& oct(ios&);
  2663. istream& ws(istream&);
  2664. ostream& endl(ostream& i);
  2665. ostream& ends(ostream& i);
  2666. ostream& flush(ostream&);
  2667.  
  2668. Note:  &iostreamH. contains private declarations for an assignment operator and 
  2669. a copy constructor. &iostreamH. includes these declaration for compatibility 
  2670. with AT&T C++ Language System Release 1.2. The declarations are private to 
  2671. prevent ios objects from being copied. 
  2672.  
  2673.  
  2674. ΓòÉΓòÉΓòÉ 9.2. Constructors and Assignment Operator for ios ΓòÉΓòÉΓòÉ
  2675.  
  2676. public:
  2677.      ios(streambuf* sb);
  2678. protected:
  2679.      ios();
  2680.      init(streambuf* isb);
  2681. private:
  2682.      ios(ios& ioa);
  2683.      void operator=(ios& iob);
  2684.  
  2685. There are three versions of the ios constructor. The version that is declared 
  2686. public takes a single argument that is a pointer to the streambuf object that 
  2687. becomes associated with the constructed ios object. If this pointer is equal to 
  2688. 0, the result is undefined. 
  2689.  
  2690. The version of the ios constructor that is declared protected takes no 
  2691. arguments. This version is needed because ios is used as a virtual base class 
  2692. for iostream, and therefore the ios class must have a constructor that takes no 
  2693. arguments. If you use this constructor in a derived class, you must use the 
  2694. init() function to associate the constructed ios object with the streambuf 
  2695. object pointed to by the argument isb. 
  2696.  
  2697. Copying of ios objects is not well defined, and for this reason, both the 
  2698. assignment operator and the copy constructor are declared private. Assignment 
  2699. between streams is supported by the istream_withassign, ostream_withassign, and 
  2700. iostream_withassign classes. See istream_withassign Assignment Operator and 
  2701. ostream_withassign Assignment Operator for more details. None of the predefined 
  2702. classes derived from ios has a copy constructor or an assignment operator. 
  2703. Unless you define your own copy constructor or assignment operator for a class 
  2704. that you derive from ios, your class will have neither a copy constructor nor 
  2705. an assignment operator. 
  2706.  
  2707.  
  2708. ΓòÉΓòÉΓòÉ 9.3. The Format State and the Error State ΓòÉΓòÉΓòÉ
  2709.  
  2710. Each ios object has a format state and an error state. The error state is a 
  2711. collection of flags that records whether any errors have taken place in the 
  2712. processing of the ios object. It also records whether the end of an input 
  2713. stream has been reached. The format state is a collection of flags and 
  2714. variables that can be set to control the details of formatting operations for 
  2715. input and output. You can view and set the format state and the error state 
  2716. using the functions described in this chapter. 
  2717.  
  2718.  
  2719. ΓòÉΓòÉΓòÉ 9.4. Format State Variables ΓòÉΓòÉΓòÉ
  2720.  
  2721. The format state is a collection of format flags and format variables that 
  2722. control the details of formatting for input and output operations. This section 
  2723. describes the format variables. 
  2724.  
  2725. The format variables have the following declarations: 
  2726.  
  2727.      short     x_precision;
  2728.      char      x_fill;
  2729.      short     x_width;
  2730.  
  2731. They are used in the following manner: 
  2732.  
  2733. o x_precision is the number of significant digits in the representation of 
  2734.   floating-point values. Its default value is 6. 
  2735. o x_fill is the character that is used to pad values that do not require the 
  2736.   width of an entire field for their representation. Its default value is a 
  2737.   space character. 
  2738. o x_width is the minimum width of a field. Its default value is 0. 
  2739.  
  2740.  
  2741. ΓòÉΓòÉΓòÉ 9.5. Format State Flags ΓòÉΓòÉΓòÉ
  2742.  
  2743. The format flags have the following declaration in &iostreamH.: 
  2744.  
  2745. enum     {     skipws,
  2746.                left, right, internal,
  2747.                dec, oct, hex,
  2748.                showbase,
  2749.                showpoint,
  2750.                uppercase,
  2751.                showpos,
  2752.                scientific, fixed,
  2753.                unitbuf, stdio
  2754.          } ;
  2755.  
  2756. The following list shows the formatting features and the format flags that 
  2757. control them: 
  2758.  
  2759. o Whitespace and padding: 
  2760.   ios::colon.::colon.colon.::colon.::colon.colon.skipws, 
  2761.   ios::colon.::colon.colon.::colon.::colon.colon.left, 
  2762.   ios::colon.::colon.colon.::colon.::colon.colon.right, 
  2763.   ios::colon.::colon.colon.::colon.::colon.colon.internal 
  2764. o Base conversion: ios::colon.::colon.colon.::colon.::colon.colon.dec, 
  2765.   ios::colon.::colon.colon.::colon.::colon.colon.hex, 
  2766.   ios::colon.::colon.colon.::colon.::colon.colon.oct, 
  2767.   ios::colon.::colon.colon.::colon.::colon.colon.showbase 
  2768. o Integral formatting: ios::colon.::colon.colon.::colon.::colon.colon.showpos 
  2769. o Floating-point formatting: 
  2770.   ios::colon.::colon.colon.::colon.::colon.colon.fixed, 
  2771.   ios::colon.::colon.colon.::colon.::colon.colon.scientific, 
  2772.   ios::colon.::colon.colon.::colon.::colon.colon.showpoint 
  2773. o Uppercase and lowercase: 
  2774.   ios::colon.::colon.colon.::colon.::colon.colon.uppercase 
  2775. o Buffer flushing: ios::colon.::colon.colon.::colon.::colon.colon.stdio, 
  2776.   ios::colon.::colon.colon.::colon.::colon.colon.unitbuf 
  2777. o Mutually exclusive format flags 
  2778.  
  2779. The following sections describe these formatting features in detail. Mutually 
  2780. Exclusive Format Flags describes the flags that produce unpredictable results 
  2781. if they are set at the same time. 
  2782.  
  2783.  
  2784. ΓòÉΓòÉΓòÉ 9.5.1. Whitespace and Padding ΓòÉΓòÉΓòÉ
  2785.  
  2786. The following format state flags control whitespace and padding characters: 
  2787.  
  2788. o skipws: if ios::colon.::colon.colon.::colon.::colon.colon.skipws is set, 
  2789.   whitespace will be skipped on input. If it is not set, whitespace is not 
  2790.   skipped. If ios::colon.::colon.colon.::colon.::colon.colon.skipws is not set, 
  2791.   the arithmetic extractors will signal an error if you attempt to read an 
  2792.   integer or floating-point value that is preceded by whitespace. 
  2793.   ios::colon.::colon.colon.::colon.::colon.colon.failbit is set, and extraction 
  2794.   ceases until it is cleared. This is done to avoid the looping problems that 
  2795.   could occur otherwise. If the following program is run with an input file 
  2796.   that contains integer values separated by spaces, 
  2797.   ios::colon.::colon.colon.::colon.::colon.colon.failbit is set after the first 
  2798.   integer value is read, and the program halts. If the program did not call 
  2799.   fail() at the beginning of the while loop to test if 
  2800.   ios::colon.::colon.colon.::colon.::colon.colon.failbit is set, it would loop 
  2801.   indefinitely. 
  2802.  
  2803.  
  2804.  
  2805.     #include <fstream.h>
  2806.  
  2807.          void main()
  2808.          {
  2809.               fstream f("spadina.dat", ios::colon.::colon.colon.::colon.::colon.colon.in);
  2810.               f.unsetf(ios::colon.::colon.colon.::colon.::colon.colon.skipws);
  2811.               int i;
  2812.               while (!f.eof() && !f.fail()) {
  2813.                    f >> i;
  2814.                    cout << i;
  2815.                    }
  2816.          }
  2817.  
  2818. o left::eph2. if ios::colon.::colon.colon.::colon.::colon.colon.left is set, 
  2819.   the value is left-justified. Fill characters are added after the value. 
  2820.  
  2821. o right: if ios::colon.::colon.colon.::colon.::colon.colon.right is set, the 
  2822.   value is right-justified. Fill characters are added before the value. 
  2823.  
  2824. o internal: if ios::colon.::colon.colon.::colon.::colon.colon.internal is set, 
  2825.   the fill characters are added after any leading sign or base notation, but 
  2826.   before the value itself. 
  2827.  
  2828.  
  2829. ΓòÉΓòÉΓòÉ 9.5.2. Base Conversion ΓòÉΓòÉΓòÉ
  2830.  
  2831. The manipulators ios::colon.::colon.colon.::colon.::colon.colon.dec, 
  2832. ios::colon.::colon.colon.::colon.::colon.colon.oct, and 
  2833. ios::colon.::colon.colon.::colon.::colon.colon.hex (see Built-In Manipulators 
  2834. for ios for more details) have the same effect as the flags 
  2835. ios::colon.::colon.colon.::colon.::colon.colon.dec, 
  2836. ios::colon.::colon.colon.::colon.::colon.colon.oct, and 
  2837. ios::colon.::colon.colon.::colon.::colon.colon.hex, respectively. 
  2838.  
  2839. o dec: if ios::colon.::colon.colon.::colon.::colon.colon.dec is set, the 
  2840.   conversion base is 10. 
  2841.  
  2842. o oct: if ios::colon.::colon.colon.::colon.::colon.colon.oct is set, the 
  2843.   conversion base is 8. 
  2844.  
  2845. o hex: if ios::colon.::colon.colon.::colon.::colon.colon.hex is set, the 
  2846.   conversion base is 16. 
  2847.  
  2848. o showbase: if ios::colon.::colon.colon.::colon.::colon.colon.showbase is set, 
  2849.   the operation that inserts values converts them to an external form that can 
  2850.   be read according to the C++ lexical conventions for integral constants. By 
  2851.   default, ios::colon.::colon.colon.::colon.::colon.colon.showbase is unset. 
  2852.  
  2853.  
  2854. ΓòÉΓòÉΓòÉ 9.5.3. Integral Formatting ΓòÉΓòÉΓòÉ
  2855.  
  2856. o showpos: if ios::colon.::colon.colon.::colon.::colon.colon.showpos is set, 
  2857.   the operation that inserts values places a positive sign "+" into decimal 
  2858.   conversions of positive integral values. 
  2859.  
  2860.  
  2861. ΓòÉΓòÉΓòÉ 9.5.4. Floating-Point Formatting ΓòÉΓòÉΓòÉ
  2862.  
  2863. The following format flags control the formatting of floating-point values: 
  2864.  
  2865. o showpoint: if ios::colon.::colon.colon.::colon.::colon.colon.showpoint is 
  2866.   set, trailing zeros and a decimal point appear in the result of a 
  2867.   floating-point conversion. This flag has no effect if either 
  2868.   ios::colon.::colon.colon.::colon.::colon.colon.scientific or 
  2869.   ios::colon.::colon.colon.::colon.::colon.colon.fixed is set. 
  2870.  
  2871. o scientific: if ios::colon.::colon.colon.::colon.::colon.colon.scientific is 
  2872.   set, the value is converted using scientific notation. In scientific 
  2873.   notation, there is one digit before the decimal point and the number of 
  2874.   digits following the decimal point depends on the value of 
  2875.   ios::colon.::colon.colon.::colon.::colon.colon.x_precision. The default value 
  2876.   for ios::colon.::colon.colon.::colon.::colon.colon.x_precision is 6. If 
  2877.   ios::colon.::colon.colon.::colon.::colon.colon.uppercase is set, an uppercase 
  2878.   "E" precedes the exponent. Otherwise, a lowercase "e" precedes the exponent. 
  2879.  
  2880. o fixed: if ios::colon.::colon.colon.::colon.::colon.colon.fixed is set, 
  2881.   floating point values are converted to fixed notation with the number of 
  2882.   digits after the decimal point equal to the value of 
  2883.   ios::colon.::colon.colon.::colon.::colon.colon.x_precision (or 6 by default). 
  2884.  
  2885. If neither ios::colon.::colon.colon.::colon.::colon.colon.fixed nor 
  2886. ios::colon.::colon.colon.::colon.::colon.colon.scientific is set, the 
  2887. representation of floating-point values depends on their values and the number 
  2888. of significant digits in the representation equals 
  2889. ios::colon.::colon.colon.::colon.::colon.colon.x_precision. Floating-point 
  2890. values are converted to scientific notation if the exponent resulting from a 
  2891. conversion to scientific notation is less than -4 or greater than or equal to 
  2892. the value of ios::colon.::colon.colon.::colon.::colon.colon.x_precision. 
  2893. Otherwise, floating-point values are converted to fixed notation. If 
  2894. ios::colon.::colon.colon.::colon.::colon.colon.showpoint is not set, trailing 
  2895. zeros are removed from the result and a decimal point appears only if it is 
  2896. followed by a digit. ios::colon.::colon.colon.::colon.::colon.colon.scientific 
  2897. and ios::colon.::colon.colon.::colon.::colon.colon.fixed are collectively 
  2898. identified by the static member 
  2899. ios::colon.::colon.colon.::colon.::colon.colon.floatfield. 
  2900.  
  2901. The following example shows some of the possibilities for formatting a 
  2902. floating-point value: 
  2903.  
  2904.  
  2905. #include
  2906. <iomanip.h>
  2907.  
  2908. void main()
  2909. {
  2910.      float fp = 3.14f;
  2911.      //
  2912.      // print the value with an uppercase "E" in the exponent
  2913.      //
  2914.      cout << setiosflags(ios::colon.::colon.colon.::colon.::colon.colon.scientific|ios::colon.::colon.colon.::colon.::colon.colon.uppercase);
  2915.      cout << "Here is a floating-point value " << fp << endl;
  2916.      //
  2917.      // print the value with a lowercase "e" in the exponent
  2918.      //
  2919.      cout << resetiosflags(ios::colon.::colon.colon.::colon.::colon.colon.uppercase);
  2920.      cout << "Here is a floating-point value "
  2921.           << fp << endl;
  2922.      //
  2923.      // print the value in fixed format
  2924.      //
  2925.      cout << resetiosflags(ios::colon.::colon.colon.::colon.::colon.colon.scientific)
  2926.           << setiosflags(ios::colon.::colon.colon.::colon.::colon.colon.fixed);
  2927.      cout << "Here is a floating-point value "
  2928.           << fp << endl;
  2929. }
  2930.  
  2931. This program produces the following output: 
  2932.  
  2933. Here is a floating-point value 3.140000E+00
  2934. Here is a floating-point value 3.140000e+00
  2935. Here is a floating-point value 3.140000
  2936.  
  2937.  
  2938. ΓòÉΓòÉΓòÉ 9.5.5. Uppercase and Lowercase ΓòÉΓòÉΓòÉ
  2939.  
  2940. o uppercase: if ios::colon.::colon.colon.::colon.::colon.colon.uppercase is 
  2941.   set, the operation that inserts values uses an uppercase "E" for floating 
  2942.   point values in scientific notation. In addition, the operation that inserts 
  2943.   values stores hexadecimal digits "A" to "F" in uppercase and places an 
  2944.   uppercase "X" before hexadecimal values when 
  2945.   ios::colon.::colon.colon.::colon.::colon.colon.showbase is set. If 
  2946.   ios::colon.::colon.colon.::colon.::colon.colon.uppercase is not set, a 
  2947.   lowercase "e" introduces the exponent in floating-point values, hexadecimal 
  2948.   digits "a" to "f" are stored in lowercase, and a lowercase "x" is inserted 
  2949.   before hexadecimal values when 
  2950.   ios::colon.::colon.colon.::colon.::colon.colon.showbase is set. 
  2951.  
  2952.  
  2953. ΓòÉΓòÉΓòÉ 9.5.6. Buffer Flushing ΓòÉΓòÉΓòÉ
  2954.  
  2955. o unitbuf: if ios::colon.::colon.colon.::colon.::colon.colon.unitbuf is set, 
  2956.   ostream::colon.::colon.colon.::colon.::colon.colon.osfx() performs a flush 
  2957.   after each insertion. The attached stream buffer is unit buffered. 
  2958.  
  2959. o stdio: this flag is used internally by sync_with_stdio(). You should not use 
  2960.   ios::colon.::colon.colon.::colon.::colon.colon.stdio directly. If you want to 
  2961.   combine I/O Stream Library input and output with stdio.h input and output, 
  2962.   you should use sync_with_stdio():exhp.. See sync_with_stdio - Attach stdiobuf 
  2963.   Object to Predefined Streams for more details on sync_with_stdio(). 
  2964.  
  2965.  
  2966. ΓòÉΓòÉΓòÉ 9.5.7. Mutually Exclusive Format Flags ΓòÉΓòÉΓòÉ
  2967.  
  2968. If you specify conflicting flags the results are unpredictable. For example, 
  2969. the results will be unpredictable if you set both 
  2970. ios::colon.::colon.colon.::colon.::colon.colon.left and 
  2971. ios::colon.::colon.colon.::colon.::colon.colon.right in the format state of 
  2972. iosobj. You should set only one flag in each set of the following three sets: 
  2973.  
  2974. o ios::colon.::colon.colon.::colon.::colon.colon.left, 
  2975.   ios::colon.::colon.colon.::colon.::colon.colon.right, 
  2976.   ios::colon.::colon.colon.::colon.::colon.colon.internal 
  2977. o ios::colon.::colon.colon.::colon.::colon.colon.dec, 
  2978.   ios::colon.::colon.colon.::colon.::colon.colon.oct, 
  2979.   ios::colon.::colon.colon.::colon.::colon.colon.hex 
  2980. o ios::colon.::colon.colon.::colon.::colon.colon.scientific, 
  2981.   ios::colon.::colon.colon.::colon.::colon.colon.fixed. 
  2982.  
  2983.  
  2984. ΓòÉΓòÉΓòÉ 9.6. Public Members of ios for the Format State ΓòÉΓòÉΓòÉ
  2985.  
  2986. You can use the member functions listed below to control the format state of an 
  2987. ios object. 
  2988.  
  2989. Note:  The following descriptions assume that the functions are called as part 
  2990. of an ios object called iosobj. 
  2991.  
  2992.  
  2993. ΓòÉΓòÉΓòÉ 9.6.1. fill - Set the Fill Character ΓòÉΓòÉΓòÉ
  2994.  
  2995. char fill() const;
  2996. char fill(char fillchar);
  2997.  
  2998. There are two versions of fill(). fill() with no arguments returns the value of 
  2999. ios::colon.::colon.colon.::colon.::colon.colon.x_fill in the format state of 
  3000. iosobj. fill() with an argument fillchar sets 
  3001. ios::colon.::colon.colon.::colon.::colon.colon.x_fill to be equal to fillchar. 
  3002.  
  3003. ios::colon.::colon.colon.::colon.::colon.colon.x_fill is the character used as 
  3004. padding if the field is wider than the representation of a value. The default 
  3005. value for ios::colon.::colon.colon.::colon.::colon.colon.x_fill is a space. The 
  3006. ios::colon.::colon.colon.::colon.::colon.colon.left, 
  3007. ios::colon.::colon.colon.::colon.::colon.colon.right, and 
  3008. ios::colon.::colon.colon.::colon.::colon.colon.internal flags determine the 
  3009. position of the fill character. 
  3010.  
  3011. You can also use the parameterized manipulator setfill to set the value of 
  3012. ios::colon.::colon.colon.::colon.::colon.colon.x_fill. 
  3013.  
  3014.  
  3015. ΓòÉΓòÉΓòÉ 9.6.2. flags - Set Format Flags ΓòÉΓòÉΓòÉ
  3016.  
  3017. long flags() const;
  3018. long flags(long flagset);
  3019.  
  3020. There are two versions of flags(). The version that takes no arguments returns 
  3021. the value of the flags that make up the current format state. The version that 
  3022. takes an argument sets the flags in the format state to the settings specified 
  3023. in flagset and returns the value of the previous settings of the format flags. 
  3024.  
  3025.  
  3026. ΓòÉΓòÉΓòÉ 9.6.3. precision - Set the Precision ΓòÉΓòÉΓòÉ
  3027.  
  3028. int precision() const;
  3029. int precision(int prec);
  3030.  
  3031. There are two versions of precision(). The version that takes no arguments 
  3032. returns the value of 
  3033. ios::colon.::colon.colon.::colon.::colon.colon.x_precision. The version that 
  3034. takes one argument sets the value of 
  3035. ios::colon.::colon.colon.::colon.::colon.colon.x_precision to prec and returns 
  3036. the previous value. The value of prec must be greater than 0. If the value is 
  3037. negative, the value of the 
  3038. ios::colon.::colon.colon.::colon.::colon.colon.x_precision is set to the 
  3039. default value, 6. ios::colon.::colon.colon.::colon.::colon.colon.x_precision 
  3040. controls the number of significant digits when floating-point values are 
  3041. inserted. 
  3042.  
  3043. If neither ios::colon.::colon.colon.::colon.::colon.colon.scientific nor 
  3044. ios::colon.::colon.colon.::colon.::colon.colon.fixed is set, 
  3045. ios::colon.::colon.colon.::colon.::colon.colon.x_precision specifies the number 
  3046. of significant digits in the floating-point value that is being inserted. If, 
  3047. in addition, ios::colon.::colon.colon.::colon.::colon.colon.showpoint is not 
  3048. set, all trailing zeros are removed and a decimal point only appears if it is 
  3049. followed by digits. 
  3050.  
  3051. If either ios::colon.::colon.colon.::colon.::colon.colon.scientific or 
  3052. ios::colon.::colon.colon.::colon.::colon.colon.fixed is set, 
  3053. ios::colon.::colon.colon.::colon.::colon.colon.x_precision specifies the number 
  3054. of digits following the decimal point. 
  3055.  
  3056.  You can also use the parameterized manipulator setprecision to set 
  3057. ios::colon.::colon.colon.::colon.::colon.colon.x_precision. 
  3058.  
  3059.  
  3060. ΓòÉΓòÉΓòÉ 9.6.4. setf - Set Specific Format Flags ΓòÉΓòÉΓòÉ
  3061.  
  3062. long setf(long newset);
  3063. long setf(long newset, long field);
  3064.  
  3065. There are two versions of setf(). The version that takes one argument sets the 
  3066. format flags that are marked in newset and returns the previous value of the 
  3067. format state. You can also use the parameterized manipulator setiosflags to set 
  3068. the format flags to a specific setting. 
  3069.  
  3070. The difference between setf() and flags() is that flags() sets all of the 
  3071. format flags to the settings specified by its argument, while setf() only sets 
  3072. the format flags specified by its second argument. 
  3073.  
  3074. Note:  If you set conflicting flags the results are unpredictable. 
  3075.  
  3076.  
  3077. ΓòÉΓòÉΓòÉ 9.6.5. skip - Set ios::colon.::colon.colon.::colon.::colon.colon.skipws Format Flag ΓòÉΓòÉΓòÉ
  3078.  
  3079. int skip(int i);
  3080.  
  3081. skip() sets the format flag 
  3082. ios::colon.::colon.colon.::colon.::colon.colon.skipws if the value of the 
  3083. argument i does not equal 0. If i does equal 0, 
  3084. ios::colon.::colon.colon.::colon.::colon.colon.skipws is cleared. skip() 
  3085. returns a value of 1 if ios::colon.::colon.colon.::colon.::colon.colon.skipws 
  3086. was set prior to the call to skip(), and returns 0 otherwise. 
  3087.  
  3088.  
  3089. ΓòÉΓòÉΓòÉ 9.6.6. unsetf - Turn Off Format Flags ΓòÉΓòÉΓòÉ
  3090.  
  3091. long unsetf(long oflags);
  3092.  
  3093. unsetf() turns off the format flags specified in oflags and returns the 
  3094. previous format state. 
  3095.  
  3096.  
  3097. ΓòÉΓòÉΓòÉ 9.6.7. width - Set Field Width ΓòÉΓòÉΓòÉ
  3098.  
  3099. int width() const;
  3100. int width(int fwidth);
  3101.  
  3102. There are two versions of width(). The version that takes no arguments returns 
  3103. the value of the current setting of the format state field width variable, 
  3104. ios::colon.::colon.colon.::colon.::colon.colon.x_width. If the value of 
  3105. ios::colon.::colon.colon.::colon.::colon.colon.x_width is smaller than the 
  3106. space needed for the representation of the value, the full value is still 
  3107. inserted. 
  3108.  
  3109. The version of width() that takes one argument fwidth sets 
  3110. ios::colon.::colon.colon.::colon.::colon.colon.x_width to the value of fwidth 
  3111. and returns the previous value. The default field width is 0. When the value of 
  3112. ios::colon.::colon.colon.::colon.::colon.colon.x_width is 0, the operations 
  3113. that insert values only insert the characters needed to represent a value. 
  3114.  
  3115. If the value of ios::colon.::colon.colon.::colon.::colon.colon.x_width is 
  3116. greater than 0, the characters needed to represent the value are inserted. Then 
  3117. fill characters are inserted, if necessary, so that the representation of the 
  3118. value takes up the entire field. 
  3119. ios::colon.::colon.colon.::colon.::colon.colon.x_width only specifies a minimum 
  3120. width, not a maximum width. If the number of characters needed to represent a 
  3121. value is greater than the field width, none of the characters is truncated. 
  3122. After every insertion, the value of 
  3123. ios::colon.::colon.colon.::colon.::colon.colon.x_width is reset to 0. After 
  3124. every extraction of a value of one of the following types, the value of 
  3125. ios::colon.::colon.colon.::colon.::colon.colon.x_width is reset to 0: 
  3126.  
  3127. o char* 
  3128. o unsigned char* 
  3129. o signed char*. 
  3130.  
  3131. Extractions of any other types do not affect 
  3132. ios::colon.::colon.colon.::colon.::colon.colon.x_width. 
  3133.  
  3134. You can also use the parameterized manipulator setw to set the field width. 
  3135.  
  3136.  
  3137. ΓòÉΓòÉΓòÉ 9.7. Public Members of ios for User-Defined Format Flags ΓòÉΓòÉΓòÉ
  3138.  
  3139. In addition to the flags described in Format State Flags, you can also use the 
  3140. ios member functions listed in this section to define additional format flags 
  3141. or variables in classes that you derive from ios. 
  3142.  
  3143.  
  3144. ΓòÉΓòÉΓòÉ 9.7.1. bitalloc - Create Bit Set ΓòÉΓòÉΓòÉ
  3145.  
  3146. static long bitalloc();
  3147.  
  3148. bitalloc() is a static function that returns a long value with a previously 
  3149. unallocated bit set. You can use this long value as an additional flag, and 
  3150. pass it as an argument to the format state member functions. When all the bits 
  3151. are exhausted, bitalloc() returns 0. 
  3152.  
  3153.  
  3154. ΓòÉΓòÉΓòÉ 9.7.2. iword - Return Reference to User-Defined Flag ΓòÉΓòÉΓòÉ
  3155.  
  3156. long& iword(int i);
  3157.  
  3158. iword() returns a reference to the ith user-defined flag, where i is an index 
  3159. returned by xalloc(). iword() allocates space for the user-defined flag. If the 
  3160. allocation fails, iword() sets 
  3161. ios::colon.::colon.colon.::colon.::colon.colon.failbit. 
  3162.  
  3163.  
  3164. ΓòÉΓòÉΓòÉ 9.7.3. pword - Return Reference to User-Defined Flag ΓòÉΓòÉΓòÉ
  3165.  
  3166. void* & pword(int i);
  3167.  
  3168. pword() returns a reference to a pointer to the  ith user-defined flag, where i 
  3169. is an index returned by xalloc(). pword() allocates space for the user-defined 
  3170. flag. If the allocation fails, pword() sets 
  3171. ios::colon.::colon.colon.::colon.::colon.colon.failbit. pword() is the same as 
  3172. iword() except that the two functions return different types. 
  3173.  
  3174.  
  3175. ΓòÉΓòÉΓòÉ 9.7.4. xalloc - Return Index to Format State Variables ΓòÉΓòÉΓòÉ
  3176.  
  3177. static int xalloc();
  3178.  
  3179. xalloc() is a static function that returns an unused index into an array of 
  3180. words available for use as format state variables by classes derived from ios. 
  3181.  
  3182. xalloc() simply returns a new index; it does not do any allocation. iword() and 
  3183. pword() do the allocation, and if the allocation fails, they set 
  3184. ios::colon.::colon.colon.::colon.::colon.colon.failbit. You should check 
  3185. ios::colon.::colon.colon.::colon.::colon.colon.failbit after calling iword() or 
  3186. pword(). 
  3187.  
  3188.  
  3189. ΓòÉΓòÉΓòÉ 9.8. Public Members of ios for the Error State ΓòÉΓòÉΓòÉ
  3190.  
  3191. The error state is an enumeration that records the errors that take place in 
  3192. the processing of ios objects. It has the following declaration: 
  3193.  
  3194. enum io_state { goodbit, eofbit, failbit, badbit, hardfail};
  3195.  
  3196. The error state is manipulated using the ios member functions described in this 
  3197. section. 
  3198.  
  3199.  1. hardfail is a flag used internally by the I/O Stream Library. Do not use 
  3200.     it. 
  3201.  
  3202.  2. The following descriptions assume that the functions are called as part of 
  3203.     an ios object called iosobj. 
  3204.  
  3205.  
  3206. ΓòÉΓòÉΓòÉ 9.8.1. bad - Check ios::colon.::colon.colon.::colon.::colon.colon.badbit ΓòÉΓòÉΓòÉ
  3207.  
  3208. int bad() const;
  3209.  
  3210. bad() returns a nonzero value if 
  3211. ios::colon.::colon.colon.::colon.::colon.colon.badbit is set in the error state 
  3212. of iosobj. Otherwise, it returns 0. 
  3213. ios::colon.::colon.colon.::colon.::colon.colon.badbit is usually set when some 
  3214. operation on the streambuf object that is associated with the ios object has 
  3215. failed. It will probably not be possible to continue input and output 
  3216. operations on the ios object. 
  3217.  
  3218.  
  3219. ΓòÉΓòÉΓòÉ 9.8.2. clear - Set Error State ΓòÉΓòÉΓòÉ
  3220.  
  3221. void clear(int state=0);
  3222.  
  3223. clear() changes the error state of iosobj to state. If state equals 0 (its 
  3224. default), all of the bits in the error state are cleared. If you want to set 
  3225. one of the bits without clearing the other bits in the error state, you can 
  3226. bitwise OR the bit you want to set with the current error state. For example, 
  3227. the following statement sets 
  3228. ios::colon.::colon.colon.::colon.::colon.colon.badbit in iosobj and leaves all 
  3229. the other error state bits unchanged: 
  3230.  
  3231. iosobj.clear(ios::colon.::colon.colon.::colon.::colon.colon.badbit|iosobj.rdstate());
  3232.  
  3233.  
  3234. ΓòÉΓòÉΓòÉ 9.8.3. eof - Check ios::colon.::colon.colon.::colon.::colon.colon.eofbit ΓòÉΓòÉΓòÉ
  3235.  
  3236. int eof() const;
  3237.  
  3238. eof() returns a nonzero value if 
  3239. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is set in the error state 
  3240. of iosobj. Otherwise, it returns 0. 
  3241. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is usually set when an 
  3242. EOF has been encountered during an extraction operation. 
  3243.  
  3244.  
  3245. ΓòÉΓòÉΓòÉ 9.8.4. fail - Check ios::colon.::colon.colon.::colon.::colon.colon.failbit and ios::colon.::colon.colon.::colon.::colon.colon.badbit ΓòÉΓòÉΓòÉ
  3246.  
  3247. int fail() const;
  3248.  
  3249. fail() returns a nonzero value if either 
  3250. ios::colon.::colon.colon.::colon.::colon.colon.badbit or 
  3251. ios::colon.::colon.colon.::colon.::colon.colon.failbit is set in the error 
  3252. state. Otherwise, it returns 0. 
  3253.  
  3254.  
  3255. ΓòÉΓòÉΓòÉ 9.8.4.0.0.0.0.0.0.1. olon.colon.::colon.::colon.colon.badbit╨▒ ΓòÉΓòÉΓòÉ
  3256.  
  3257. ; nonzero 0 ; ; nonzero 0 nonzero 0 ; ; nonzero 0 ; ; nonzero 0 nonzero 0 
  3258. badbit .0
  3259.  
  3260. () in ;;nonzero0;;nonzero0nonzero0;;nonzero0;;nonzero0nonzero0badbit. ( fail 0 
  3261. returns :0 ;;nonzero0;;nonzero0nonzero0;;nonzero0;;nonzero0nonzero0badbit:. it 
  3262. colon 0 
  3263.  
  3264. ;;nonzero0;;nonzero0nonzero0;;nonzero0;;nonzero0nonzero0badbit :. it if 0 it if 
  3265. . . state 0 ;;nonzero0;;nonzero0nonzero0;;nonzero0;;nonzero0nonzero0badbitcolon 
  3266. . colon 0 it colon . 0eitherthe.; ; nonzero 0 ; ; nonzero 0 nonzero 0 ; ; 
  3267. nonzero 0 ; ; nonzero 0 nonzero 0 badbit : 0eitherthevaluecolon.; ; nonzero 0 ; 
  3268. ; nonzero 0 nonzero 0 ; ; nonzero 0 ; ; nonzero 0 nonzero 0 badbit : ;
  3269.  
  3270. ) is ,
  3271.   is, 
  3272.   is,0 
  3273.  
  3274. failbit set const 
  3275. ;;nonzero0;;nonzero0nonzero0;;nonzero0;;nonzero0nonzero0badbit0 
  3276.  
  3277. ios error 
  3278.  
  3279. ifstream();
  3280. ifstream(int d);
  3281. ifstream(const char* fname,
  3282.          int mode=ios&c2.in,
  3283.          int prot=filebuf&c2.openprot);
  3284. ifstream(int d, char* p, int len);
  3285.  
  3286. There are four versions of the ifstream constructor. The first version takes no 
  3287. arguments and constructs an unopened ifstream object. The second version takes 
  3288. one argument and constructs an ifstream object that is attached to the file 
  3289. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  3290. ifs. 
  3291.  
  3292. The third and fourth versions of the ifstream() constructor take three 
  3293. arguments. The third version constructs an ifstream object and opens the file 
  3294. fname with open mode equal to mode and protection mode equal to prot. The 
  3295. default value for mode is ios&c2.in, and the default value for prot is 
  3296. filebuf&c2.openprot. If the file cannot be opened, the error state of the 
  3297. constructed ifstream object is set. 
  3298.  
  3299. The fourth version constructs an ifstream object that is attached to the file 
  3300. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  3301. ifs. This constructor also sets up an associated filebuf object with a stream 
  3302. buffer that has length len bytes and begins at the position pointed to by p. If 
  3303. p is equal to 0 or len is equal to 0, the associated filebuf object is 
  3304. unbuffered. 
  3305.  
  3306. void clear(int state=0);
  3307.  
  3308. clear() changes the error state of iosobj to state. If state equals 0 (its 
  3309. default), all of the bits in the error state are cleared. If you want to set 
  3310. one of the bits without clearing the other bits in the error state, you can 
  3311. bitwise OR the bit you want to set with the current error state. For example, 
  3312. the following statement sets 
  3313. ios::colon.::colon.colon.::colon.::colon.colon.badbit in iosobj and leaves all 
  3314. the other error state bits unchanged: 
  3315.  
  3316. iosobj.clear(ios::colon.::colon.colon.::colon.::colon.colon.badbit|iosobj.rdstate());
  3317. error ) sets(). 
  3318.  
  3319. equals other and current | error without its you want one void) set ios For 
  3320. changes: 
  3321.  
  3322. colon of=  in( default( example( bits( int;
  3323.  
  3324. equals other state one statement If clear its ) 
  3325.  
  3326.  .) int other all following leaves bitwise iosobj,to sets) clearing the 
  3327.     rdstate) 
  3328.  
  3329.  0) For cleared bit If are can badbit with want and one unchanged can OR) 
  3330. default 
  3331.  
  3332. default are() bitwise;
  3333.  
  3334. are() rdstate = If want clearing 
  3335. equals::bits.::bits.bits.::bits.::bits.bits.badbit error  example set colon to 
  3336. changes state ios error. of, following rdstate 0. 
  3337. equals::bits.::bits.bits.::bits.::bits.bits.badbit example void set with sets 
  3338. its iosobj to statement int the example and you to equals int cleared clear. 
  3339. For without other in bit OR unchanged can current all one leaves iosobj to 
  3340. equals int. bit ( 
  3341.  
  3342. void clear(int state=0);
  3343.  
  3344. clear() changes the error state of iosobj to state. If state equals 0 (its 
  3345. default), all of the bits in the error state are cleared. If you want to set 
  3346. one of the bits without clearing the other bits in the error state, you can 
  3347. bitwise OR the bit you want with the current error state. For example, the 
  3348. following statement sets ios::colon.::colon.colon.::colon.::colon.colon.badbit 
  3349. in iosobj and leaves all the other error state bits unchanged: 
  3350.  
  3351. iosobj.clear(ios::colon.::colon.colon.::colon.::colon.colon.badbit|iosobj.rdstate());
  3352.  
  3353. default bitwise() badbit;
  3354.  
  3355. bitwise() ios = For one colon equals::are.::are.are.::are.::are.are.changes 
  3356. example iosobj current leaves clear its If error. int, following ios 0. 
  3357. equals::are.::are.are.::are.::are.are.changes example of iosobj OR all can 
  3358.  
  3359. clear bits() are;
  3360.  
  3361. bits() error = current If can badbit cleared::and.::and.and.::and.::and.and.all 
  3362. default cleared::and.::and.and.::and.::and.and.bitwise clearing example changes 
  3363. For bit following. equals, colon error 0. 
  3364. ;current0;;current0current0;;current0;;current0current0allto without its . of 
  3365. to sets0 
  3366.  
  3367. () changes one the;;current0;;current0current0;;current0;;current0current0all . 
  3368. ( one bits 0 error int to :0 
  3369. the;;current0;;current0current0;;current0;;current0current0allto :. set set 
  3370. colon without and 0 
  3371.  
  3372. rdstate the;;current0;;current0current0;;current0;;current0current0allcolon 
  3373. 0badbitForstate .the ; ; current 0 ; ; current 0 current 0 ; ; current 0 ; ; 
  3374. current 0 current 0 all to0 badbit For If and iosobj . 
  3375. the;;current0;;current0current0;;current0;;current0current0allto :; 
  3376.  
  3377. unchangedwithout)
  3378.  
  3379. with,.all
  3380. with,you iosobj.all
  3381. with,If For0 sets:
  3382. (you and|)example;without:
  3383. (you andrdstate;.all
  3384. with,you iosobj: For0 : you .all
  3385.  
  3386. bitwise the with int; set changes bits ios bit with ; can bits ios bit with 
  3387. clearing other leaves iosobj; void iosobj : |)example;OR without statement 
  3388. want; 
  3389.  
  3390. bits to with,. int changes; ios bit with bits other sets of bits of ; its state 
  3391. |)example;without: bits state rdstate)example;; void other following colon : 
  3392. one in with ; 
  3393.  
  3394. to ios bit with clearing other leaves iosobj; void iosobj : |)example;OR 
  3395. without statement want; int badbit bit clear rdstate are default unchanged 
  3396. error bits current cleared equals ; void of = of =: clear rdstate ;  bit ( 
  3397.  
  3398. void clear(int state=0);
  3399.  
  3400. clear() changes the error state of iosobj to state. If state equals 0 (its 
  3401. default), all of the bits in the error state are cleared. If you want to set 
  3402. one of the bits without clearing the other bits in the error state, you can 
  3403. bitwise OR the bit you want to set with the current error state. For example, 
  3404. the following statement sets 
  3405. ios::colon.::colon.colon.::colon.::colon.colon.badbit in iosobj and leaves all 
  3406. the other error state bits unchanged: 
  3407.  
  3408. iosobj.clear(ios::colon.::colon.colon.::colon.::colon.colon.badbit|iosobj.rdstate());
  3409. bit ( error ) sets(). 
  3410.  
  3411. equals other and current | error without its you want one void) set ios For 
  3412. changes) are colon  of =   in (  default (  example (  bits (  int ; 
  3413.  
  3414. equals other state one statement If clear its ) 
  3415.  
  3416.  .) int other all following leaves bitwise iosobj,to sets) clearing the 
  3417.     rdstate) 
  3418.  
  3419.  0) For cleared bit If are can badbit with want and one unchanged can OR) 
  3420. default 
  3421.  
  3422. default are() bitwise;
  3423.  
  3424. are() rdstate = If want clearing 
  3425. equals::bits.::bits.bits.::bits.::bits.bits.badbit bit ( error  example set 
  3426. colon to changes state ios error. of, following rdstate 0. 
  3427. equals::bits.::bits.bits.::bits.:. bits . 
  3428. badbitexamplevoidsetwithsetsitsiosobjtostatementinttheexampleandyoutoequalsintclearedclear 
  3429. .ForwithoutotherinbitORunchangedcancurrentalloneleavesiosobjtoequalsint .bit(
  3430.  
  3431. void clear(int state=0);
  3432.  
  3433. clear() changes the error state of iosobj to state. If state equals 0 (its 
  3434. default), all of the bits in the error state are cleared. If you want to set 
  3435. one of the bits without clearing the other bits in the error state, you can 
  3436. bitwise OR the bit you want bit ( with the current error state. For example, 
  3437. the following statement sets 
  3438. ios::colon.::colon.colon.::colon.::colon.colon.badbit in iosobj and leaves all 
  3439. the other error state bits unchanged: 
  3440.  
  3441. iosobj.clear(ios::colon.::colon.colon.::colon.::colon.colon.badbit|iosobj.rdstate());
  3442.  
  3443. default bitwise() badbit;
  3444.  
  3445. bitwise() ios = For one colon equals::are.::are.are.::are.::are.are.changes 
  3446. example iosobj current leaves clear its If error. int, following ios 0. 
  3447. equals::are.::are.are.::are.::are.are.changes example of iosobj OR all can 
  3448.  
  3449. ifstream();
  3450. ifstream(int d);
  3451. ifstream(const char* fname,
  3452.          int mode=ios&c2.in,
  3453.          int prot=filebuf&c2.openprot);
  3454. ifstream(int d, char* p, int len);
  3455.  
  3456. There are four versions of the ifstream constructor. The first version takes no 
  3457. arguments and constructs an unopened ifstream object. The second version takes 
  3458. one argument and constructs an ifstream object that is attached to the file 
  3459. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  3460. ifs. 
  3461.  
  3462. The third and fourth versions of the ifstream() constructor take three 
  3463. arguments. The third version constructs an ifstream object and opens the file 
  3464. fname with open mode equal to mode and protection mode equal to prot. The 
  3465. default value for mode is ios&c2.in, and the default value for prot is 
  3466. filebuf&c2.openprot. If the file cannot be opened, the error state of the 
  3467. constructed ifstream object is set. 
  3468.  
  3469. The fourth version constructs an ifstream object that is attached to the file 
  3470. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  3471. ifs. This constructor also sets up an associated filebuf object with a stream 
  3472. buffer that has length len bytes and begins at the position pointed to by p. If 
  3473. p is equal to 0 or len is equal to 0, the associated filebuf object is 
  3474. unbuffered. 
  3475.  
  3476. int eof() const;
  3477.  
  3478. eof() returns a nonzero value if 
  3479. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is set in the error state 
  3480. of iosobj. Otherwise, it returns 0. 
  3481. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is usually set when an 
  3482. EOF has been encountered during an extraction operation. iosobj  0
  3483.  
  3484. extraction during ) 
  3485.  
  3486. ,.an
  3487. , set.an
  3488. ,of nonzero0 :
  3489. ( been)is;:
  3490. ( beenduring(;.an
  3491. , set: nonzero0 :  .an
  3492.  
  3493. eof ; eofbit encountered returns during ; EOF encountered returns during has 
  3494. the set; set : )is;when ; 
  3495.  
  3496. encountered ,. Otherwise eofbit; returns during encountered usually encountered 
  3497. usually ; state )is;: encountered during ( )is;; it if : value operation ; 
  3498.  
  3499. returns during has the set; set : is ; 
  3500. when;Otherwiseconstduringerrorcolonintiosobjencounteredinextractionios;usuallyausuallya :error; during(
  3501.  
  3502.  error(Otherwise a0);
  3503.  
  3504. error(iosobj  eofbit iosobj usually set . of ios 0 (state int), an usually 
  3505. encountered operation iosobj colon extraction. of value usually encountered has 
  3506. encountered operation iosobj , EOF eof when during in iosobj . nonzero is, it 
  3507. returns::if.::if.if.::if.::if.if.const . ( set been the an iosobj encountered : 
  3508.  
  3509. set.error(returns::if.::if.if.::if.::if.if.constset.());
  3510. during ( iosobj ) (). 
  3511.  
  3512. ios been in iosobj state value ) returns nonzero eofbitduring ( ) colon if 
  3513. usually a   operation (  int (  is (  Otherwise ; 
  3514.  
  3515. ios value of error state ) 
  3516.  
  3517.  .) Otherwise an it the eof set,) has ) 
  3518.  
  3519.  0) nonzero extraction during of colon EOF const been value EOF when) 
  3520. int 
  3521.  
  3522. int colon() eof;
  3523.  
  3524. ) a of has 
  3525. ios::encountered.::encountered.encountered.::encountered.::encountered.encountered.const 
  3526. during ( iosobj  is if eofbit returns iosobj. usually, it 0. 
  3527. ios::encountered.::encountered.encountered.::encountered.:during(.encountered.const 
  3528. is state set Otherwise is been ios Otherwise extraction error. nonzero 
  3529. operation during when EOF in an ios Otherwise. during ( 
  3530.  
  3531.  error(Otherwise a0);
  3532.  
  3533. error() eofbit iosobj usually set . of ios 0 (state int), an usually 
  3534. encountered operation iosobj colon extraction. of value usually encountered has 
  3535. encountered operation iosobj , EOF eof when during ( in iosobj . nonzero is, it 
  3536. returns::if.::if.if.::if.::if.if.const operation set been the an iosobj 
  3537. encountered : 
  3538.  
  3539. set.error(returns::if.::if.if.::if.::if.if.constset.());
  3540.  
  3541. int eof() const;
  3542.  
  3543. ( )returnsanonzerovalueifios : : colon . : : colon . colon . : : colon . : : 
  3544. colon . colon . eofbitissetintheerrorstateofiosobj .Otherwise ,itreturns0 .ios 
  3545. : : colon . : : colon . colon . : : colon . : : colon . colon . eofbitisusuallysetwhenanEOF
  3546.  
  3547. ,.an
  3548. , set.an
  3549. ,of nonzero0 :
  3550. ( been)is;:
  3551. ( been)is;.an
  3552. , set: nonzero0 :  .an
  3553.  
  3554. eof Otherwise; eofbit encountered returns during 
  3555. ;EOFencounteredreturnsduringhastheset ;set:) is ; when;
  3556.  
  3557. encountered ,. Otherwise eofbit; returns during encountered usually encountered 
  3558. usually ;state) is ; :encounteredstate) is ; ;itif:valueoperation;
  3559.  
  3560. returns during has the set; set : )is;when ; Otherwise const during error colon 
  3561. int iosobj encountered in extraction ios ; usually a usually a: error ; iosobj 
  3562.  
  3563. int eof() const;
  3564.  
  3565. eof() returns a nonzero value if ios::colon.::colon.coloncolon . : : colon . 
  3566. colon . eofbitissetintheerrorstateofiosobj .Otherwise ,itreturns0 .ios : : 
  3567. colon . : : colon . colon . : : colon . : : colon . colon . 
  3568. eofbitisusuallysetwhenanEOFhasbeenencounteredduringanextractionoperation 
  3569. . iosobj0 
  3570.  
  3571. extraction during ) 
  3572.  
  3573. ,.an
  3574. , set.an
  3575. ,of nonzero0 . :
  3576. ( been)is;:
  3577. ( beenduring(;.an
  3578. , set: nonzero0 :  .an
  3579.  
  3580. eof  ;eofbitencounteredreturnsduring;EOFencounteredreturnsduringhastheset ;: 
  3581. )is;when ; 
  3582.  
  3583. encountered ,. Otherwise eofbit; returns during encountered usually 
  3584. encountered usually ; state )is;during ( )is;; it if : value operation ; 
  3585.  
  3586. returns during has the set; set :  is;when ; Otherwise const during error colon 
  3587. int iosobj encountered in extraction ios ; usually a usually a: error ;  during 
  3588.  
  3589.  error(Otherwise a0);
  3590.  
  3591. error()  iosobj  eofbit iosobj usually set . of ios 0 (state int)encountered 
  3592. operation iosobj colon extraction. of value usually encountered has encountered 
  3593. operation iosobj , EOF eof when during in iosobj . nonzero is, it 
  3594. returns::if.::if.if.::if.::if.if.const operation  . ( set been the an iosobj 
  3595. encountered : 
  3596.  
  3597. set.error(returns::if.::if.if.::if..if.constset.());
  3598. during ( iosobj ) (). 
  3599.  
  3600. ios been in iosobj state value ) returns nonzero eofbitduring ( ) colon if 
  3601. usually a   operation (  int (  is (  encountered  Otherwise ; 
  3602.  
  3603. ios value of error state ) 
  3604.  
  3605.  .) Otherwise the eof set,) has ) 
  3606.  
  3607.  0) nonzero extraction during of colon EOF const been value EOF when) 
  3608. int 
  3609.  
  3610. int colon() eof;
  3611.  
  3612. colon )aofhasios : : encountered . : : encountered . encountered . : : 
  3613. encountered . : : encountered . encountered . 
  3614. constduring(iosobj isifeofbitreturns( iosobj. usually, it 0. 
  3615. ios::encountered.::encountered.encountered.::encountered.:during(.encountered.const 
  3616. is state set Otherwise is been ios Otherwise extraction error. nonzero 
  3617. operation during when EOF in an value  ios Otherwise. during ( 
  3618.  
  3619.  error(Otherwise a0);
  3620.  
  3621. erroreofbit iosobj usually set . of ios 0 (state int), an usually encountered 
  3622. operation iosobj colon extraction. of value usually encountered has encountered 
  3623. operation iosobj , EOF eof when during  during ( in iosobj . nonzero is, it 
  3624. returns::if.::if.if.::if.::if.if.const set been the an iosobj encountered : 
  3625.  
  3626. set.error(returns::if.::if.if.::if.::if.if.constset.());
  3627.  
  3628. int eof() const;
  3629.  
  3630.  ( )returnsanonzerovalueifios : : colon . : : colon . colon . : : colon . : : 
  3631. colon . colon . eofbitissetintheerror, . ( iosobj. Otherwise, it returns 0. 
  3632. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is usually set when an 
  3633. EOF 
  3634.  
  3635. ,.an
  3636. , set.an
  3637. ,of nonzero0 :
  3638. ( been)is;:
  3639. ( been)is;.an
  3640. , set: nonzero0 :  .an
  3641.  
  3642. eof Otherwise; eofbit encountered returns during 
  3643. ;EOFencounteredreturnsduringhastheset ;set:) is ; when;
  3644.  
  3645. encountered ,. Otherwise eofbit; returns during encountered usually encountered 
  3646. usually ;state) is ; :encounteredstate) is ; ;itif:valueoperation;
  3647.  
  3648. returns during has the set; set : )is;when ; Otherwise const during error colon 
  3649. int iosobj encountered in extraction ios ; usually a usually a: error ; iosobj 
  3650.  
  3651. int eof() const;
  3652.  
  3653. eof() returns a nonzero value if ios::colon.::colon.coloncolon . : : colon . 
  3654. colon . eofbitissetintheerrorstateofiosobj .Otherwise ,itreturns0 .ios : : 
  3655. colon . : : colon . colon . : : colon . : : colon . colon . 
  3656. eofbitisusuallysetwhenanEOFhasbeenencounteredduringanextractionoperation 
  3657. . iosobj0 
  3658.  
  3659. extraction during ) 
  3660.  
  3661. ,.an
  3662. , set.an
  3663. ,of nonzero0 . :
  3664. ( been)is;:
  3665. ( beenduring(;.an
  3666. , set: nonzero0 :  .an
  3667.  
  3668. eof  ;eofbitencounteredreturnsduring;EOFencounteredreturnsduringhastheset ;
  3669.  
  3670. ifstream();
  3671. ifstream(int d);
  3672. ifstream(const char* fname,
  3673.          int mode=ios&c2.in,
  3674.          int prot=filebuf&c2.openprot);
  3675. ifstream(int d, char* p, int len);
  3676.  
  3677. There are four versions of the ifstream constructor. The first version takes no 
  3678. arguments and constructs an unopened ifstream object. The second version takes 
  3679. one argument and constructs an ifstream object that is attached to the file 
  3680. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  3681. ifs. 
  3682.  
  3683. The third and fourth versions of the ifstream() constructor take three 
  3684. arguments. The third version constructs an ifstream object and opens the file 
  3685. fname with open mode equal to mode and protection mode equal to prot. The 
  3686. default value for mode is ios&c2.in, and the default value for prot is 
  3687. filebuf&c2.openprot. If the file cannot be opened, the error state of the 
  3688. constructed ifstream object is set. 
  3689.  
  3690. The fourth version constructs an ifstream object that is attached to the file 
  3691. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  3692. ifs. This constructor also sets up an associated filebuf object with a stream 
  3693. buffer that has length len bytes and begins at the position pointed to by p. If 
  3694. p is equal to 0 or len is equal to 0, the associated filebuf object is 
  3695. unbuffered. 
  3696.  
  3697. int fail() const;
  3698.  
  3699. fail() returns a nonzero value if either 
  3700. ios::colon.::colon.colon.::colon.::colon.colon.badbit or 
  3701. ios::colon.::colon.colon.::colon.::colon.colon.failbit is set in the error 
  3702. state. Otherwise, it returns 0. ) the inerror ( ) const it  a   (  or (  set ( 
  3703. fail  ; 
  3704.  
  3705. Otherwise value int ) 
  3706.  
  3707.  .) badbit  failbit ,) is ) 
  3708.  
  3709.  0) value const if either colon if ) 
  3710. or 
  3711.  
  3712. or const() failbit;
  3713.  
  3714. const )avalueisOtherwise : : fail . : : fail . fail . : : fail . : : fail . 
  3715. fail . eithererror(returns setitin .,state0 .Otherwise : : fail . : : fail . 
  3716. fail . : : fail . : error ( . fail . eithersetsetcolonOtherwiseiosint .theerrorifnonzerobadbit Otherwise.error(
  3717.  
  3718.  int(,.(a0);
  3719.  
  3720. int( inreturns.valueOtherwise0( or ) ,badbitfailreturnsconstios 
  3721. .valuefailisfailreturns,iffailbitreturns  error  error ( nonzero returns . the 
  3722. set, state ::it.::it.it.::it.::it.it.either  colon badbit returns fail : 
  3723.  
  3724. .int(::it.::it.it.::it.::it.it.either.());
  3725.  
  3726. or failbit() either;
  3727.  
  3728.  ( )atheitOtherwise : : const . : : const . const . : : const . : : const . 
  3729. const . insetnonzeroint ,.(returns .,state0 .Otherwise : : : const . const . : 
  3730. : const . : : const . const . insetbadbitif
  3731.  
  3732. ,.badbit
  3733. , .badbit
  3734. ,value the0 :
  3735. ( colon)set;:
  3736. ( colon)set;.badbit
  3737. , : the0 :   .badbit
  3738.  
  3739. failbit ; in fail error  ;iffailerroris;:) set ; ;
  3740.  
  3741. fail ,. in; error fail fail  ;) set ; :fail) set ; ;stateit:;
  3742.  
  3743. error is ; : )set; ; either error int returns fail nonzero ios Otherwise ; a a: 
  3744. int ; returns 
  3745.  
  3746. or failbit() either;
  3747.  
  3748. failbit() a the it Otherwise::constconst . const .  const . : : const . const . 
  3749. insetnonzerointvaluereturns .,state0 .Otherwise : : const . : : const . const . 
  3750. : : const . : : const . const . 
  3751. insetbadbitifiscolonfailerrorbadbitios. returns0 
  3752.  
  3753. ios error 
  3754.  
  3755. ,.badbit
  3756. , .badbit
  3757. ,value the0  . :
  3758. ( colon)set;:
  3759. ( colonerror(;.badbit
  3760. , : the0 :   .badbit
  3761.  
  3762. failbit  ;infailerror;iffailerroris;)
  3763.  
  3764. ,.badbit
  3765. , .badbit
  3766. ,value the0 :
  3767. ( . colon)set;:
  3768. ( colon)set;.badbit
  3769. , : the0 :  .badbit
  3770.  
  3771. failbit ; in fail error ; if fail error is ; : )set;; 
  3772.  
  3773. fail ,. in; error fail .  fail ; )set;: fail )set;; state it : ; 
  3774.  
  3775. error is ;:) set ; ;eithererrorintconstorreturnsfailnonzeroiosOtherwise;aa: int 
  3776.  
  3777. int fail() const;
  3778.  
  3779. fail() returns a nonzero value if either 
  3780. ios::colon.::colon.colon.::colon.::colon.colon.badbit or 
  3781. ios::colon.::colon.colon.::colon.::colon.colon.returns  is set in the error 
  3782. state. Otherwise, it returns 0.  )thein error()constit a  ( or( set( fail ;
  3783.  
  3784. Otherwise value int ) 
  3785.  
  3786.  .) badbit  failbit ,) 
  3787.  
  3788.  0) the  value const if either colon if ) 
  3789. or 
  3790.  
  3791. or const() failbit;
  3792.  
  3793. const )avalueisOtherwise : : fail . : : fail . fail . : : fail . : fail . 
  3794. eithererror(returns setitin, returns ) Otherwise . error ( 
  3795.  
  3796.  int( ,.(a0);
  3797.  
  3798. int( inreturns.valueOtherwise0( or ) ,badbitfailreturnsconstios .valuefail is 
  3799. fail returns , if failbit  returns  error  error ( nonzero returns . the set, 
  3800. state ::it.::it.it.::it.::it.it.either  colon badbit returns fail : 
  3801.  
  3802. .int(.::it.it.::it.::it.it.either .());
  3803.  
  3804. or failbit() either;
  3805.  
  3806.  ( )atheitOtherwise : : const . : : const . const . : : const . : : const . 
  3807. const . insetnonzeroint ,.(returns  .,state0 .Otherwise : : const  : const . 
  3808. const . : : const . : : const . const . insetbadbitif
  3809.  
  3810. ,.badbit
  3811. , .badbit
  3812. ,value the0 :
  3813. ( colon)set;:
  3814. ( colon)set;.badbit
  3815. , : the0 :   .badbit
  3816.  
  3817. failbit ; in fail error  ;iffailerroris;:) set ; ;
  3818.  
  3819. fail ,. in; error fail fail  ;) set ; :fail) set ; ;stateit:;
  3820.  
  3821. error is ; : )set; ; either error int returns fail nonzero ios Otherwise ; a a: 
  3822. int ; returns 
  3823.  
  3824. or failbit() either;
  3825.  
  3826. failbit() a the it Otherwise::constconst . const .  const . : : const . const . 
  3827. insetnonzerointvaluereturns .,state0 .Otherwise : : const . : : const . const . 
  3828. : : const . : : const . const . 
  3829. insetbadbitifiscolonfailerrorbadbitios. returns0 
  3830.  
  3831. ios error 
  3832.  
  3833. ,.badbit
  3834. , .badbit
  3835. ,value the0  . :
  3836. ( colon)set;:
  3837. ( colonerror(;.badbit
  3838. , : the0 :   .badbit
  3839.  
  3840. failbit  ;infailerror;iffailerroris;)
  3841.  
  3842. ,.badbit
  3843. , .badbit
  3844. ,value the0 :
  3845. ( . colon)set;:
  3846. ( colon)set;.badbit
  3847. , : the0 :  .badbit
  3848.  
  3849. failbit ; in fail error ; if fail error is ; : )set;; 
  3850.  
  3851. fail ,. in; error fail .  fail ; )set;: fail )set;; state it : ; 
  3852.  
  3853. error is ;:) set ; ;eithererrorintconstorreturnsfailnonzeroiosOtherwise;aa: int 
  3854.  
  3855. int fail() const;
  3856.  
  3857. fail() returns a nonzero value if either 
  3858. ios::colon.::colon.colon.::colon.::colon.colon.badbit or 
  3859. ios::colon.::colon.colon.::colon.::colon.colon.returns  is set in the error 
  3860. state. Otherwise, it returns 0.  )thein error()constit a  ( or( set( fail ;
  3861.  
  3862. Otherwise value int ) 
  3863.  
  3864.  .) badbit  failbit ,) 
  3865.  
  3866.  0) the  value const if either colon if ) 
  3867. or 
  3868.  
  3869. or const() failbit;
  3870.  
  3871. const )avalueisOtherwise : : fail . : : fail . fail . : : fail . : fail . eithererror(returns setitin
  3872.  
  3873.  
  3874. ΓòÉΓòÉΓòÉ 9.8.4.0.0.0.0.0.0.1.0.0.0.0.1. eof - Check ios::colon.::colon.colon.::colon.::colon.colon.eofbit╨Æ╨░ ΓòÉΓòÉΓòÉ
  3875.  
  3876.  
  3877. ΓòÉΓòÉΓòÉ <hidden> d - Are Any Bits Set!╨▓ ΓòÉΓòÉΓòÉ
  3878.  
  3879. , returns ) Otherwise . error ( 
  3880.  
  3881.  int( ,.(a0);
  3882.  
  3883. int( inreturns.valueOtherwise0( or ) ,badbitfailreturnsconstios .valuefail is 
  3884. fail returns , if failbit  returns  error  error ( nonzero returns . the set, 
  3885. state ::it.::it.it.::it.::it.it.either  colon badbit returns fail : 
  3886.  
  3887. .int(.::it.it.::it.::it.it.either .());
  3888.  
  3889. or failbit() either;
  3890.  
  3891.  ( )atheitOtherwise : : const . : : const . const . : : const . : : const . 
  3892. const . insetnonzeroint ,.(returns  .,state0 .Otherwise : : const  : const . 
  3893. const . : : const . : : const . const . insetbadbitif
  3894.  
  3895. ,.badbit
  3896. , .badbit
  3897. ,value the0 :
  3898. ( colon)set;:
  3899. ( colon)set;.badbit
  3900. , : the0 :   .badbit
  3901.  
  3902. failbit ; in fail error  ;iffailerroris;:) set ; ;
  3903.  
  3904. fail ,. in; error fail fail  ;) set ; :fail) set ; ;stateit:;
  3905.  
  3906. error is ; : )set; ; either error int returns fail nonzero ios Otherwise ; a a: 
  3907. int ; returns 
  3908.  
  3909. or failbit() either;
  3910.  
  3911. failbit() a the it Otherwise::constconst . const .  const . : : const . const . 
  3912. insetnonzerointvaluereturns .,state0 .Otherwise : : const . : : const . const . 
  3913. : : const . : : const . const . 
  3914. insetbadbitifiscolonfailerrorbadbitios. returns0 
  3915.  
  3916. ios error 
  3917.  
  3918. ,.badbit
  3919. , .badbit
  3920. ,value the0  . :
  3921. ( colon)set;:
  3922. ( colonerror(;.badbit
  3923. , : the0 :   .badbit
  3924.  
  3925. failbit  ;infailerror;iffailerroris;)
  3926.  
  3927. ,.badbit
  3928. , .badbit
  3929. ,value the0 :
  3930. ( . colon)set;:
  3931. ( colon)set;.badbit
  3932. , : the0 :  .badbit
  3933.  
  3934. failbit ; in fail error ; if fail error is ; : )set;; 
  3935.  
  3936. fail ,. in; error fail .  fail ; )set;: fail )set;; state it : ; 
  3937.  
  3938. error is ;:) set ; ;eithererrorintconstorreturnsfailnonzeroiosOtherwise;aa: int 
  3939.  
  3940. int fail() const;
  3941.  
  3942. fail() returns a nonzero value if either 
  3943. ios::colon.::colon.colon.::colon.::colon.colon.badbit or 
  3944. ios::colon.::colon.colon.::colon.::colon.colon.returns  is set in the error 
  3945. state. Otherwise, it returns 0.  )thein error()constit a  ( or( set( fail ;
  3946.  
  3947. Otherwise value int ) 
  3948.  
  3949.  .) badbit  failbit ,) 
  3950.  
  3951.  0) the  value const if either colon if ) 
  3952. or 
  3953.  
  3954. or const() failbit;
  3955.  
  3956. const )avalueisOtherwise : : fail . : : fail . fail . : : fail . : fail . 
  3957. eithererror(returns setitin, returns ) Otherwise . error ( 
  3958.  
  3959.  int( ,.(a0);
  3960.  
  3961. int( inreturns.valueOtherwise0( or ) ,badbitfailreturnsconstios .valuefail is 
  3962. fail returns , if failbit  returns  error  error ( nonzero returns . the set, 
  3963. state ::it.::it.it.::it.::it.it.either  colon badbit returns fail : 
  3964.  
  3965. .int(.::it.it.::it.::it.it.either .());
  3966.  
  3967. or failbit() either;
  3968.  
  3969.  ( )atheitOtherwise : : const . : : const . const . : : const . : : const . 
  3970. const . insetnonzeroint ,.(returns  .,state0 .Otherwise : : const  : const . 
  3971. const . : : const . : : const . const . insetbadbitif
  3972.  
  3973. ,.badbit
  3974. , .badbit
  3975. ,value the0 :
  3976. ( colon)set;:
  3977. ( colon)set;.badbit
  3978. , : the0 :   .badbit
  3979.  
  3980. failbit ; in fail error  ;iffailerroris;:) set ; ;
  3981.  
  3982. fail ,. in; error fail fail  ;) set ; :fail) set ; ;stateit:;
  3983.  
  3984. error is ; : )set; ; either error int returns fail nonzero ios Otherwise ; a a: 
  3985. int ; returns 
  3986.  
  3987. or failbit() either;
  3988.  
  3989. failbit() a the it Otherwise::constconst . const .  const . : : const . const . 
  3990. insetnonzerointvaluereturns .,state0 .Otherwise : : const . : : const . const . 
  3991. : : const . : : const . const . 
  3992. insetbadbitifiscolonfailerrorbadbitios. returns0 
  3993.  
  3994. ios error 
  3995.  
  3996. ,.badbit
  3997. , .badbit
  3998. ,value the0  . :
  3999. ( colon)set;:
  4000. ( colonerror(;.badbit
  4001. , : the0 :   .badbit
  4002.  
  4003. failbit  ;infailerror;iffailerroris;)
  4004.  
  4005. ,.badbit
  4006. , .badbit
  4007. ,value the0 :
  4008. ( . colon)set;:
  4009. ( colon)set;.badbit
  4010. , : the0 :  .badbit
  4011.  
  4012. failbit ; in fail error ; if fail error is ; : )set;; 
  4013.  
  4014. fail ,. in; error fail .  fail ; )set;: fail )set;; state it : ; 
  4015.  
  4016. error is ;:) set ; ;eithererrorintconstorreturnsfailnonzeroiosOtherwise;aa: int 
  4017.  
  4018. int fail() const;
  4019.  
  4020. fail() returns a nonzero value if either 
  4021. ios::colon.::colon.colon.::colon.::colon.colon.badbit or 
  4022. ios::colon.::colon.colon.::colon.::colon.colon.returns  is set in the error 
  4023. state. Otherwise, it returns 0.  )thein error()constit a  ( or( set( fail ;
  4024.  
  4025. Otherwise value int ) 
  4026.  
  4027.  .) badbit  failbit ,) 
  4028.  
  4029.  0) the  value const if either colon if ) 
  4030. or 
  4031.  
  4032. or const() failbit;
  4033.  
  4034. const )avalueisOtherwise : : fail . : : fail . fail . : : fail . : fail . 
  4035. eithererror(returns setitin, returns ) Otherwise . error ( 
  4036.  
  4037.  int( ,.(a0);
  4038.  
  4039. int( inreturns.valueOtherwise0( or ) ,badbitfailreturnsconstios .valuefail is 
  4040. fail returns , if failbit  returns  error  error ( nonzero returns . the set, 
  4041. state ::it.::it.it.::it.::it.it.either  colon badbit returns fail : 
  4042.  
  4043. .int(.::it.it.::it.::it.it.either .());
  4044.  
  4045. or failbit() either;
  4046.  
  4047.  ( )atheitOtherwise : : const . : : const . const . : : const . : : const . 
  4048. const . insetnonzeroint ,.(returns  .,state0 .Otherwise : : const  : const . 
  4049. const . : : const . : : const . const . insetbadbitif
  4050.  
  4051. ,.badbit
  4052. , .badbit
  4053. ,value the0 :
  4054. ( colon)set;:
  4055. ( colon)set;.badbit
  4056. , : the0 :   .badbit
  4057.  
  4058. failbit ; in fail error  ;iffailerroris;:) set ; ;
  4059.  
  4060. fail ,. in; error fail fail  ;) set ; :fail) set ; ;stateit:;
  4061.  
  4062. error is ; : )set; ; either error int returns fail nonzero ios Otherwise ; a a: 
  4063. int ; returns 
  4064.  
  4065. or failbit() either;
  4066.  
  4067. failbit() a the it Otherwise::constconst . const .  const . : : const . const . 
  4068. insetnonzerointvaluereturns .,state0 .Otherwise : : const . : : const . const . 
  4069. : : const . : : const . const . 
  4070. insetbadbitifiscolonfailerrorbadbitios. returns0 
  4071.  
  4072. ios error 
  4073.  
  4074. ,.badbit
  4075. , .badbit
  4076. ,value the0  . :
  4077. ( colon)set;:
  4078. ( colonerror(;.badbit
  4079. , : the0 :   .badbit
  4080.  
  4081. failbit  ;infailerror;iffailerroris;)
  4082.  
  4083. ,.badbit
  4084. , .badbit
  4085. ,value the0 :
  4086. ( . colon)set;:
  4087. ( colon)set;.badbit
  4088. , : the0 :  .badbit
  4089.  
  4090. failbit ; in fail error ; if fail error is ; : )set;; 
  4091.  
  4092. fail ,. in; error fail .  fail ; )set;: fail )set;; state it : ; 
  4093.  
  4094. error is ;:) set ; ;eithererrorintconstorreturnsfailnonzeroiosOtherwise;aa: int 
  4095.  
  4096. int fail() const;
  4097.  
  4098. fail() returns a nonzero value if either 
  4099. ios::colon.::colon.colon.::colon.::colon.colon.badbit or 
  4100. ios::colon.::colon.colon.::colon.::colon.colon.returns  is set in the error 
  4101. state. Otherwise, it returns 0.  )thein error()constit a  ( or( set( fail ;
  4102.  
  4103. Otherwise value int ) 
  4104.  
  4105.  .) badbit  failbit ,) 
  4106.  
  4107.  0) the  value const if either colon if ) 
  4108. or 
  4109.  
  4110. or const() failbit;
  4111.  
  4112. const )avalueisOtherwise : : fail . : : fail . fail . : : fail . : fail . 
  4113. eithererror(returns setitin, returns ) Otherwise . error ( 
  4114.  
  4115.  int( ,.(a0);
  4116.  
  4117. int( inreturns.valueOtherwise0( or ) ,badbitfailreturnsconstios .valuefail is 
  4118. fail returns , if failbit  returns  error  error ( nonzero returns . the set, 
  4119. state ::it.::it.it.::it.::it.it.either  colon badbit returns fail : 
  4120.  
  4121. .int(.::it.it.::it.::it.it.either .());
  4122.  
  4123. or failbit() either;
  4124.  
  4125.  ( )atheitOtherwise : : const . : : const . const . : : const . : : const . 
  4126. const . insetnonzeroint ,.(returns  .,state0 .Otherwise : : const  : const . 
  4127. const . : : const . : : const . const . insetbadbitif
  4128.  
  4129. ,.badbit
  4130. , .badbit
  4131. ,value the0 :
  4132. ( colon)set;:
  4133. ( colon)set;.badbit
  4134. , : the0 :   .badbit
  4135.  
  4136. failbit ; in fail error  ;iffailerroris;:) set ; ;
  4137.  
  4138. fail ,. in; error fail fail  ;) set ; :fail) set ; ;stateit:;
  4139.  
  4140. error is ; : )set; ; either error int returns fail nonzero ios Otherwise ; a a: 
  4141. int ; returns 
  4142.  
  4143. or failbit() either;
  4144.  
  4145. failbit() a the it Otherwise::constconst . const .  const . : : const . const . 
  4146. insetnonzerointvaluereturns .,state0 .Otherwise : : const . : : const . const . 
  4147. : : const . : : const . const . 
  4148. insetbadbitifiscolonfailerrorbadbitios. returns0 
  4149.  
  4150. ios error 
  4151.  
  4152. ,.badbit
  4153. , .badbit
  4154. ,value the0  . :
  4155. ( colon)set;:
  4156. ( colonerror(;.badbit
  4157. , : the0 :   .badbit
  4158.  
  4159. failbit  ;infailerror;iffailerroris;)
  4160.  
  4161. ,.badbit
  4162. , .badbit
  4163. ,value the0 :
  4164. ( . colon)set;:
  4165. ( colon)set;.badbit
  4166. , : the0 :  .badbit
  4167.  
  4168. failbit ; in fail error ; if fail error is ; : )set;; 
  4169.  
  4170. fail ,. in; error fail .  fail ; )set;: fail )set;; state it : ; 
  4171.  
  4172. error is ;:) set ; ;eithererrorintconstorreturnsfailnonzeroiosOtherwise;aa: int 
  4173.  
  4174. int fail() const;
  4175.  
  4176. fail() returns a nonzero value if either 
  4177. ios::colon.::colon.colon.::colon.::colon.colon.badbit or 
  4178. ios::colon.::colon.colon.::colon.::colon.colon.returns  is set in the error 
  4179. state. Otherwise, it returns 0.  )thein error()constit a  ( or( set( fail ;
  4180.  
  4181. Otherwise value int ) 
  4182.  
  4183.  .) badbit  failbit ,) 
  4184.  
  4185.  0) the  value const if either colon if ) 
  4186. or 
  4187.  
  4188. or const() failbit;
  4189.  
  4190. const )avalueisOtherwise : : fail . : : fail . fail . : : fail . : fail . 
  4191. eithererror(returns setitin, returns ) Otherwise . error ( 
  4192.  
  4193.  int( ,.(a0);
  4194.  
  4195. int( inreturns.valueOtherwise0( or ) ,badbitfailreturnsconstios .valuefail is 
  4196. fail returns , if failbit  returns  error  error ( nonzero returns . the set, 
  4197. state ::it.::it.it.::it.::it.it.either  colon badbit returns fail : 
  4198.  
  4199. .int(.::it.it.::it.::it.it.either .());
  4200.  
  4201. or failbit() either;
  4202.  
  4203.  ( )atheitOtherwise : : const . : : const . const . : : const . : : const . 
  4204. const . insetnonzeroint ,.(returns  .,state0 .Otherwise : : const  : const . 
  4205. const . : : const . : : const . const . insetbadbitif
  4206.  
  4207. ,.badbit
  4208. , .badbit
  4209. ,value the0 :
  4210. ( colon)set;:
  4211. ( colon)set;.badbit
  4212. , : the0 :   .badbit
  4213.  
  4214. failbit ; in fail error  ;iffailerroris;:) set ; ;
  4215.  
  4216. fail ,. in; error fail fail  ;) set ; :fail) set ; ;stateit:;
  4217.  
  4218. error is ; : )set; ; either error int returns fail nonzero ios Otherwise ; a a: 
  4219. int ; returns 
  4220.  
  4221. or failbit() either;
  4222.  
  4223. failbit() a the it Otherwise::constconst . const .  const . : : const . const . 
  4224. insetnonzerointvaluereturns .,state0 .Otherwise : : const . : : const . const . 
  4225. : : const . : : const . const . 
  4226. insetbadbitifiscolonfailerrorbadbitios. returns0 
  4227.  
  4228. ios error 
  4229.  
  4230. ,.badbit
  4231. , .badbit
  4232. ,value the0  . :
  4233. ( colon)set;:
  4234. ( colonerror(;.badbit
  4235. , : the0 :   .badbit
  4236.  
  4237. failbit  ;infailerror;iffailerroris;)
  4238.  
  4239. ,.badbit
  4240. , .badbit
  4241. ,value the0 :
  4242. ( . colon)set;:
  4243. ( colon)set;.badbit
  4244. , : the0 :  .badbit
  4245.  
  4246. failbit ; in fail error ; if fail error is ; : )set;; 
  4247.  
  4248. fail ,. in; error fail .  fail ; )set;: fail )set;; state it : ; 
  4249.  
  4250. error is ;:) set ; ;eithererrorintconstorreturnsfailnonzeroiosOtherwise;aa: int 
  4251.  
  4252. int fail() const;
  4253.  
  4254. fail() returns a nonzero value if either 
  4255. ios::colon.::colon.colon.::colon.::colon.colon.badbit or 
  4256. ios::colon.::colon.colon.::colon.::colon.colon.returns  is set in the error 
  4257. state. Otherwise, it returns 0.  )thein error()constit a  ( or( set( fail ;
  4258.  
  4259. Otherwise value int ) 
  4260.  
  4261.  .) badbit  failbit ,) 
  4262.  
  4263.  0) the  value const if either colon if ) 
  4264. or 
  4265.  
  4266. or const() failbit;
  4267.  
  4268. const )avalueisOtherwise : : fail . : : fail . fail . : : fail . : fail . 
  4269. eithererror(returns setitin, returns ) Otherwise . error ( 
  4270.  
  4271.  int( ,.(a0);
  4272.  
  4273. int( inreturns.valueOtherwise0( or ) ,badbitfailreturnsconstios .value
  4274.  
  4275.  
  4276. ΓòÉΓòÉΓòÉ <hidden> n.colon.::colon.::colon.colon.failbit and ios::colon.::co ΓòÉΓòÉΓòÉ
  4277.  
  4278. fail is fail returns , if failbit  returns  error  error ( nonzero returns . 
  4279. the set, state ::it.::it.it.::it.::it.it.either  colon badbit returns fail : 
  4280.  
  4281. .int(.::it.it.::it.::it.it.either .());
  4282.  
  4283. or failbit() either;
  4284.  
  4285.  ( )atheitOtherwise : : const . : : const . const . : : const . : : const . 
  4286. const . insetnonzeroint ,.(returns  .,state0 .Otherwise : : const  : const . 
  4287. const . : : const . : : const . const . insetbadbitif
  4288.  
  4289. ,.badbit
  4290. , .badbit
  4291. ,value the0 :
  4292. ( colon)set;:
  4293. ( colon)set;.badbit
  4294. , : the0 :   .badbit
  4295.  
  4296. failbit ; in fail error  ;iffailerroris;:) set ; ;
  4297.  
  4298. fail ,. in; error fail fail  ;) set ; :fail) set ; ;stateit:;
  4299.  
  4300. error is ; : )set; ; either error int returns fail nonzero ios Otherwise ; a a: 
  4301. int ; returns 
  4302.  
  4303. or failbit() either;
  4304.  
  4305. failbit() a the it Otherwise::constconst . const .  const . : : const . const . 
  4306. insetnonzerointvaluereturns .,state0 .Otherwise : : const . : : const . const . 
  4307. : : const . : : const . const . 
  4308. insetbadbitifiscolonfailerrorbadbitios. returns0 
  4309.  
  4310. ios error 
  4311.  
  4312. ,.badbit
  4313. , .badbit
  4314. ,value the0  . :
  4315. ( colon)set;:
  4316. ( colonerror(;.badbit
  4317. , : the0 :   .badbit
  4318.  
  4319. failbit  ;infailerror;iffailerroris;)
  4320.  
  4321. ,.badbit
  4322. , .badbit
  4323. ,value the0 :
  4324. ( . colon)set;:
  4325. ( colon)set;.badbit
  4326. , : the0 :  .badbit
  4327.  
  4328. failbit ; in fail error ; if fail error is ; : )set;; 
  4329.  
  4330. fail ,. in; error fail .  fail ; )set;: fail )set;; state it : ; 
  4331.  
  4332. error is ;:) set ; ;eithererrorintconstorreturnsfailnonzeroiosOtherwise;aa: int 
  4333.  
  4334. int fail() const;
  4335.  
  4336. fail() returns a nonzero value if either 
  4337. ios::colon.::colon.colon.::colon.::colon.colon.badbit or 
  4338. ios::colon.::colon.colon.::colon.::colon.colon.returns  is set in the error 
  4339. state. Otherwise, it returns 0.  )thein error()constit a  ( or( set( fail ;
  4340.  
  4341. Otherwise value int ) 
  4342.  
  4343.  .) badbit  failbit ,) 
  4344.  
  4345.  0) the  value const if either colon if ) 
  4346. or 
  4347.  
  4348. or const() failbit;
  4349.  
  4350. const )avalueisOtherwise : : fail . : : fail . fail . : : fail . : fail . 
  4351. eithererror(returns setitin, returns ) Otherwise . error ( 
  4352.  
  4353.  int( ,.(a0);
  4354.  
  4355. int( inreturns.valueOtherwise0( or ) ,badbitfailreturnsconstios .valuefail is 
  4356. fail returns , if failbit  returns  error  error ( nonzero returns . the set, 
  4357. state ::it.::it.it.::it.::it.it.either  colon badbit returns fail : 
  4358.  
  4359. .int(.::it.it.::it.::it.it.either .());
  4360.  
  4361. or failbit() either;
  4362.  
  4363.  ( )atheitOtherwise : : const . : : const . const . : : const . : : const . 
  4364. const . insetnonzeroint ,.(returns  .,state0 .Otherwise : : const  : const . 
  4365. const . : : const . : : const . const . insetbadbitif
  4366.  
  4367. ,.badbit
  4368. , .badbit
  4369. ,value the0 :
  4370. ( colon)set;:
  4371. ( colon)set;.badbit
  4372. , : the0 :   .badbit
  4373.  
  4374. failbit ; in fail error  ;iffailerroris;:) set ; ;
  4375.  
  4376. fail ,. in; error fail fail  ;) set ; :fail) set ; ;stateit:;
  4377.  
  4378. error is ; : )set; ; either error int returns fail nonzero ios Otherwise ; a a: 
  4379. int ; returns 
  4380.  
  4381. or failbit() either;
  4382.  
  4383. failbit() a the it Otherwise::constconst . const .  const . : : const . const . 
  4384. insetnonzerointvaluereturns .,state0 .Otherwise : : const . : : const . const . 
  4385. : : const . : : const . const . 
  4386. insetbadbitifiscolonfailerrorbadbitios. returns0 
  4387.  
  4388. ios error 
  4389.  
  4390. ,.badbit
  4391. , .badbit
  4392. ,value the0  . :
  4393. ( colon)set;:
  4394. ( colonerror(;.badbit
  4395. , : the0 :   .badbit
  4396.  
  4397. failbit  ;infailerror;iffailerroris;)
  4398.  
  4399. ,.badbit
  4400. , .badbit
  4401. ,value the0 :
  4402. (
  4403.  
  4404. ifstream();
  4405. ifstream(int d);
  4406. ifstream(const char* fname,
  4407.          int mode=ios&c2.in,
  4408.          int prot=filebuf&c2.openprot);
  4409. ifstream(int d, char* p, int len);
  4410.  
  4411. There are four versions of the ifstream constructor. The first version takes no 
  4412. arguments and constructs an unopened ifstream object. The second version takes 
  4413. one argument and constructs an ifstream object that is attached to the file 
  4414. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  4415. ifs. 
  4416.  
  4417. The third and fourth versions of the ifstream() constructor take three 
  4418. arguments. The third version constructs an ifstream object and opens the file 
  4419. fname with open mode equal to mode and protection mode equal to prot. The 
  4420. default value for mode is ios&c2.in, and the default value for prot is 
  4421. filebuf&c2.openprot. If the file cannot be opened, the error state of the 
  4422. constructed ifstream object is set. 
  4423.  
  4424. The fourth version constructs an ifstream object that is attached to the file 
  4425. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  4426. ifs. This constructor also sets up an associated filebuf object with a stream 
  4427. buffer that has length len bytes and begins at the position pointed to by p. If 
  4428. p is equal to 0 or len is equal to 0, the associated filebuf object is 
  4429. unbuffered. 
  4430.  
  4431. void clear(int state=0);
  4432.  
  4433. clear() changes the error state of iosobj to state. If state equals 0 (its 
  4434. default), all of the bits in the error state are cleared. If you want to set 
  4435. one of the bits without clearing the other bits in the error state, you can 
  4436. bitwise OR the bit you want to set with the current error state. For example, 
  4437. the following statement sets 
  4438. ios::colon.::colon.colon.::colon.::colon.colon.badbit in iosobj and leaves all 
  4439. the other error state bits unchanged: 
  4440.  
  4441. iosobj.clear(ios::colon.::colon.colon.::colon.::colon.colon.badbit|iosobj.rdstate());
  4442. equals::bits.::bits.bits.::bits.:: bits.badbit bit ( error  example set colon 
  4443. to changes state ios (  changes the error state of iosobj to state. If state 
  4444. equals 0 (its default), all of the bits in the error state are cleared. If you 
  4445. want to set  the bits without clearing bits in the error state, you can bitwise 
  4446. OR  error  the bit  bit ( with the current error state. For example, the 
  4447. following statement sets ios::colon.::colon.colon.::colon.::colon.colon.badbit 
  4448. iosobj and leaves all the other error state bits unchanged: 
  4449.  
  4450. iosobj.clear(ios: .::colon.colon.::colon.::colon.colon.badbit| .rdstate());
  4451.  
  4452. default bitwise() badbit;
  4453.  
  4454.  ( )ios=Foronecolonequals : : are . : : are . are . : : are . : : are . are . 
  4455. changesexampleiosobjcurrentleavesclearits ,.(error 
  4456.  
  4457. with,.all
  4458. with,you iosobj.all
  4459. with,If For0 sets:
  4460. (you and|)example;without:
  4461. (you andrdstate)example;.all
  4462. with,you iosobj: For0 : you  with , .intchanges ;iosbitsothersetsofbitsof ; its state |)example;without: bits its state  ) example ; ;voidotherfollowingcolon:oneinwith;
  4463.  
  4464. toiosbitwithclearingotherleavesiosobj ;voidiosobj:| ) example ; ORwithout want ;intbadbitbitclearrdstateare unchangederrorbitscurrentclearedequals;voidof=of= :clearrdstate;error
  4465.  
  4466. default bitwise() badbit;
  4467.  
  4468. bitwise() ios = For one colon equals::are. are.are. are.::are.are.changes 
  4469. example iosobj current leaves clear its If error. int, following ios 0. 
  4470. equals::are.::are.are.::are.::are.are.changes example of iosobj OR all can 
  4471. clearing and bits bit all cleared in.  error  0
  4472.  
  4473. cleared bit unchanged 
  4474.  
  4475. with,.all
  4476. with,you iosobj.all
  4477. with,If For0 sets . :
  4478. (you and|)example;without:
  4479. (you andrdstate;.all
  4480. with,you iosobj: For0 : you without)
  4481.  
  4482. with,.all
  4483. with,you iosobj.all
  4484. with,If For0 sets:
  4485. (you and|)example;without:
  4486. (you andrdstate)example;.all
  4487. with,you iosobj: For0 (: you .all
  4488.  
  4489. bitwise the with int; set changes bits ios bit with ; can bits ios bit with 
  4490. clearing other leaves iosobj; void iosobj : |)example;OR without statement 
  4491. want; 
  4492.  
  4493. bits to with,. int changes; ios bit with bits other sets of bits of ; its state 
  4494. |)example;without: bits its state rdstate)example;;voidotherfollowingcolon:oneinwith;
  4495.  
  4496. to ios bit with clearing other leaves iosobj; void iosobj : |)example;OR 
  4497. without statement want; int badbit bit clear rdstate are default unchanged 
  4498. error bits current cleared equals ; void of = of =: clear rdstate ; and bit ( 
  4499.  
  4500. void clear(int state=0);
  4501.  
  4502. clear() changes the error state of iosobj to state. If state equals ( 
  4503. itsdefault ) ,allofthebitsintheerrorstatearecleared 
  4504. .Ifyouwanttosetoneofthebitswithoutclearingtheotherbitsintheerrorstate 
  4505. ,youcanbitwiseORthebityouwanttosetwiththecurrenterrorstate .Forexample 
  4506. ,thefollowingstatementsetsios : : colon . : : colon . colon . : : colon . : : 
  4507. colon . colon . badbitiniosobjandleavesalltheothererrorstatebitsunchanged :
  4508.  
  4509. iosobj.clear(ios::colon.::colon.colon.::colon.::colon.colon.badbit|iosobj.rdstate());
  4510. bit ( equals::bits.::bits.bits.::bits.:: bits.badbit bit ( error  example set 
  4511. colon to changes state ios . bits . 
  4512. badbitexamplevoidsetwithsetsitsiosobjtostatementinttheexampleandyoutoequalsintclearedclear 
  4513. .ForwithoutotherinbitORunchangedcancurrentallone  ,error)equalsint .bit(
  4514.  
  4515. void clear(int ,.(state=0);
  4516.  
  4517. clear( changestheerrorstateofiosobjtostate .Ifstateequals0( itsdefault ) 
  4518. ,allofthebitsintheerrorstatearecleared 
  4519. .Ifyouwanttoset thebitswithoutclearingbit(bitsintheerrorstate 
  4520. ,youcanbitwiseOR error thebit bit(withthecurrenterrorstate .Forexample 
  4521. ,thefollowingstatementsetsios : : colon . : : colon . colon . : : colon . : : 
  4522. colon . colon . badbit iosobj and leaves all the other error state bits 
  4523. unchanged: 
  4524.  
  4525. iosobj.clear(ios: .::colon.colon.::colon.::colon.colon.badbit| .rdstate());
  4526.  
  4527. default bitwise() badbit;
  4528.  
  4529.  ( )ios=Foronecolonequals : : are . : : are . are . : : are . : : are . are . 
  4530. changesexampleiosobjcurrentleavesclearits ,.(error 
  4531.  
  4532. with,.all
  4533. with,you iosobj.all
  4534. with,If For0 sets:
  4535. (you and|)example;without:
  4536. (you andrdstate)example;.all
  4537. with,you iosobj: For0 : you  with , .intchanges ;ios
  4538.  
  4539. ifstream();
  4540. ifstream(int d);
  4541. ifstream(const char* fname,
  4542.          int mode=ios&c2.in,
  4543.          int prot=filebuf&c2.openprot);
  4544. ifstream(int d, char* p, int len);
  4545.  
  4546. There are four versions of the ifstream constructor. The first version takes no 
  4547. arguments and constructs an unopened ifstream object. The second version takes 
  4548. one argument and constructs an ifstream object that is attached to the file 
  4549. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  4550. ifs. 
  4551.  
  4552. The third and fourth versions of the ifstream() constructor take three 
  4553. arguments. The third version constructs an ifstream object and opens the file 
  4554. fname with open mode equal to mode and protection mode equal to prot. The 
  4555. default value for mode is ios&c2.in, and the default value for prot is 
  4556. filebuf&c2.openprot. If the file cannot be opened, the error state of the 
  4557. constructed ifstream object is set. 
  4558.  
  4559. The fourth version constructs an ifstream object that is attached to the file 
  4560. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  4561. ifs. This constructor also sets up an associated filebuf object with a stream 
  4562. buffer that has length len bytes and begins at the position pointed to by p. If 
  4563. p is equal to 0 or len is equal to 0, the associated filebuf object is 
  4564. unbuffered. 
  4565.  
  4566. int eof() const;
  4567.  
  4568. eof() returns a nonzero value if 
  4569. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is set in the error state 
  4570. of iosobj. Otherwise, it returns 0. 
  4571. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is usually set when an 
  4572. EOF has been encountered during an extraction operation. set . an 
  4573. , of  nonzero 0  : 
  4574. (  been ) is ; : 
  4575. (  been ) is ; . an 
  4576. ,  set :  nonzero 0  , . ( . an 
  4577.  
  4578. eof Otherwise; eofbit encountered returns during ; EOF encountered has the set; 
  4579. set : )is;when ; 
  4580.  
  4581. encountered ,. Otherwise eofbit; returns during encountered usually encountered 
  4582. usually ; state , . ( )is;: encountered state )is;; it if : value operation ; 
  4583.  
  4584. returns during has the set; set : )is;when ; Otherwise const during error colon 
  4585. int iosobj encountered in extraction ios ; usually a usually a: error ; been 
  4586. during ( 
  4587.  
  4588.  error(Otherwise a0);
  4589.  
  4590. error() eofbit iosobj usually set  .ofiosduring((state int), an usually 
  4591. encountered operation iosobj colon extraction. of value usually encountered has 
  4592. encountered operation iosobj , EOF eof when during in iosobj . nonzero is, it 
  4593. returns::if.::if.if.::if.::if.if.const operation set been the an iosobj 
  4594. encountered : 
  4595.  
  4596. set.error(returns::if.::if.if.::if.::if.if.constset.());
  4597. during ( 
  4598. ios::encountered.::encountered.encountered.::encountered.:: encountered.const 
  4599. during ( iosobj  is if eofbit returns Otherwise is been ios Otherwise 
  4600. extraction error. nonzero operation during when EOF in an value   , iosobj ) 
  4601. ios Otherwise. during ( 
  4602.  
  4603.  error(Otherwise ,.(a0);
  4604.  
  4605. error( eofbitiosobjusuallyset.ofios0( stateint ) 
  4606. ,anusuallyencounteredoperationiosobjcolon. of  encountered has during ( 
  4607. encountered operation iosobj , EOF eof when  iosobj  during  during ( in iosobj 
  4608. . nonzero is, it returns::if.::if.if.::if.::if.if.const  set been the an iosobj 
  4609. encountered : 
  4610.  
  4611. set.error(returns: .::if.if.::if.::if.if.const.());
  4612.  
  4613. int eof() const;
  4614.  
  4615.  ( )returnsanonzerovalueifios : : colon . : : colon . colon . : : colon . : : 
  4616. colon . colon . eofbitissetintheerrorstate ,.(iosobj 
  4617.  
  4618. ,.an
  4619. , set.an
  4620. ,of nonzero0 :
  4621. ( been)is;:
  4622. ( been)is;.an
  4623. , set: nonzero0 :  ; EOF encountered returns during has the set; set : )is;when ;
  4624.  
  4625. encountered , .Otherwiseeofbit ;returns)
  4626.  
  4627. ,.an
  4628. , set.an
  4629. ,of nonzero0 . :
  4630. ( been)is;:
  4631. ( been)is;.an
  4632. , set: nonzero0 :  .an
  4633.  
  4634. eof Otherwise; eofbit encountered returns during ; EOF encountered returns 
  4635. during has the set; : )is;when ; 
  4636.  
  4637. encountered ,. Otherwise eofbit; returns during encountered usually encountered 
  4638. usually ; state )is;state )is;; it if : value operation ; 
  4639.  
  4640. returns during has the set; set : )is;when ; Otherwise const during error colon 
  4641. int iosobj encountered in extraction ios ; usually a usually a: error ; 0 
  4642.  
  4643. int eof() const;
  4644.  
  4645. eof() returns a nonzero value if 
  4646. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is set in the error state 
  4647. of iosobj. Otherwisereturns 0. 
  4648. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is usually set when an 
  4649. EOF has been encountered during an extraction operation. ,  set . an 
  4650. , of  nonzero 0  : 
  4651. (  been ) is ; : 
  4652. (  been ) is ; . an 
  4653. ,  set :  nonzero during ( ( :   . an 
  4654.  
  4655. eof Otherwise; eofbit encountered returns during ; EOF encountered returns  has 
  4656. the set; set : )is;when ; 
  4657.  
  4658. encountered ,.  Otherwise eofbit; returns during encountered usually 
  4659. encountered usually ; state  , . ( )is;: encountered state )is;; it if : value 
  4660. operation ; 
  4661.  
  4662. returns during the set; set : )is;when 
  4663. ;Otherwiseconstduringerrorcolonintiosobjencounteredinextractionios;usuallyausuallya :error;
  4664.  
  4665.  error(Otherwise a0);
  4666.  
  4667. error() eofbit iosobj usually set it returns::if.::if.if.::if.::if.if.const 
  4668. operation set been the an iosobj encountered : 
  4669.  
  4670. set.error(returns::if.::if.if.::if.::if.if.constset.());
  4671. during ( 
  4672. ios::encountered.::encountered.encountered.::encountered.:: encountered.const 
  4673. during ( iosobj  is if eofbit returns ( iosobjOtherwise ,.(a0);
  4674.  
  4675. erroreofbit iosobj usually set . of ios 0 (state int), an usually encountered 
  4676. operation iosobj colon 
  4677. .of encounteredhasduring(encounteredoperationiosobj,EOFeofwhen iosobj during during(iniosobj.nonzerois 
  4678. ,itreturns : : if . : : if . if . : : if . : : if . if . constset been the an 
  4679. iosobj encountered : 
  4680.  
  4681. set.error(returns: .::if.if.::if.::if.if.const .());
  4682.  
  4683. int eof() const;
  4684.  
  4685.  ( )returnsanonzerovalueifios : : colon . : : colon . colon . : : colon . : : 
  4686. colon . colon . eofbitissetintheerror, . ( iosobj
  4687.  error ( int 0 
  4688.  
  4689. ,.an
  4690. , set.an
  4691. ,of nonzero0 :
  4692. ( been)is;:
  4693. ( been)is;.an
  4694. , set: nonzero0 :  ; EOF encountered returns during has the set; set : )is;when ;
  4695.  
  4696. encountered , .Otherwiseeofbit ;returns)
  4697.  
  4698. ,.an
  4699. , set.an
  4700. ,of nonzero0 . :
  4701. ( been)is;:
  4702. ( been)is;.an
  4703. , set: nonzero0 :  .an
  4704.  
  4705. eof Otherwise; eofbit encountered returns during ; EOF encountered returns 
  4706. during has the set; : )is;when ; 
  4707.  
  4708. encountered ,. Otherwise eofbit; returns during encountered usually encountered 
  4709. usually ; state )is;state )is;; it if : value operation ; 
  4710.  
  4711. returns during has the set; set : )is;when ; Otherwise const during error colon 
  4712. int iosobj encountered in extraction ios ; usually a usually a: error ; 0 
  4713.  
  4714. int eof() const;
  4715.  
  4716. eof() returns a nonzero value if 
  4717. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is set in the error state 
  4718. of iosobj. Otherwisereturns 0. 
  4719. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is usually set when an 
  4720. EOF has been encountered during an extraction operation. ,  set . an 
  4721. , of  nonzero 0  : 
  4722. (  been ) is ; : 
  4723. (  been ) is ; . an 
  4724. ,  set :  nonzero during ( ( :   . an 
  4725.  
  4726. eof Otherwise; eofbit encountered returns during ; EOF encountered returns  has 
  4727. the set; set : )is;when ; 
  4728.  
  4729. encountered ,. 
  4730.  
  4731. ifstream();
  4732. ifstream(int d);
  4733. ifstream(const char* fname,
  4734.          int mode=ios&c2.in,
  4735.          int prot=filebuf&c2.openprot);
  4736. ifstream(int d, char* p, int len);
  4737.  
  4738. There are four versions of the ifstream constructor. The first version takes no 
  4739. arguments and constructs an unopened ifstream object. The second version takes 
  4740. one argument and constructs an ifstream object that is attached to the file 
  4741. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  4742. ifs. 
  4743.  
  4744. The third and fourth versions of the ifstream() constructor take three 
  4745. arguments. The third version constructs an ifstream object and opens the file 
  4746. fname with open mode equal to mode and protection mode equal to prot. The 
  4747. default value for mode is ios&c2.in, and the default value for prot is 
  4748. filebuf&c2.openprot. If the file cannot be opened, the error state of the 
  4749. constructed ifstream object is set. 
  4750.  
  4751. The fourth version constructs an ifstream object that is attached to the file 
  4752. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  4753. ifs. This constructor also sets up an associated filebuf object with a stream 
  4754. buffer that has length len bytes and begins at the position pointed to by p. If 
  4755. p is equal to 0 or len is equal to 0, the associated filebuf object is 
  4756. unbuffered. 
  4757.  
  4758. int fail() const;
  4759.  
  4760. fail() returns a nonzero value if either 
  4761. ios::colon.::colon.colon.::colon.::colon.colon.badbit or 
  4762. ios::colon.::colon.colon.::colon.::colon.colon.failbit is set in the error 
  4763. state. Otherwise, it returns 0. set colon Otherwise ios int. the error if 
  4764. nonzero badbit   , returns ) Otherwise . error ( 
  4765.  
  4766.  int( ,.(a0);
  4767.  
  4768. int( inreturns.value, .  Otherwise 0 (or), badbit fail returns const 
  4769. .value failiserror(failreturns,iffailbit returns error error(nonzeroreturns.theset 
  4770. ,state: : it . : : it . it . : : it . : : it . it . either , .  colon badbit 
  4771. returns fail : 
  4772.  
  4773. .int(: .::it.it.::it.::it.it.either .());
  4774.  
  4775. or failbit() either;
  4776.  
  4777.  ( )atheitOtherwise : : const . : const . : : const . : : const . const . 
  4778. insetnonzeroint ,.(returns 
  4779.  
  4780. ,.badbit
  4781. , .badbit
  4782. ,value the0 :
  4783. ( colon)set;:
  4784. ( colon)set;.badbit
  4785. , : the0 :   .badbit
  4786.  
  4787. failbit ; in fail error  ;iffailerroris;:) set ; ;
  4788.  
  4789. fail ,. in; ) 
  4790.  
  4791. ,.badbit
  4792. , .badbit
  4793. ,value the0  . :
  4794. ( colon)set;:
  4795. ( colon)set;.badbit
  4796. , : the0 :  .badbit
  4797.  
  4798. failbit ; in fail error ; if fail error is ;  : )set;; 
  4799.  
  4800. fail ,. in; error fail fail ; )set, returns   ) set ; ;stateit:;
  4801.  
  4802. error is ; : )set;; either error int const or returns fail nonzero ios 
  4803. Otherwise ; a a: int ; 0 
  4804.  
  4805. or failbit() either;
  4806.  
  4807. failbit() a the it Otherwise::const.::const.const.::const.::const.const.in set 
  4808. nonzero int value returns.  0. 
  4809. Otherwise::const.::const.const.::const.::const.const.in set badbit if colon 
  4810. fail error badbit ios . ,  . badbit 
  4811. , value  the 0  : 
  4812. (  colon ) set ; : 
  4813. (  colon ) set ; . badbit 
  4814. ,  :  the 0  error ( ( :    . badbit 
  4815.  
  4816. failbit ; in fail error ; if fail  is ; : )set;; 
  4817.  
  4818. fail ,.                                                                                                                                                                                                                                                        colon 
  4819.                                                                                                                                                                                                                                                                ) 
  4820.                                                                                                                                                                                                                                                                set 
  4821.                                                                                                                                                                                                                                                                ; 
  4822.                                                                                                                                                                                                                                                                : 
  4823.                                                                                                                                                                                                                                                                ( 
  4824.                                                                                                                                                                                                                                                                colon 
  4825.                                                                                                                                                                                                                                                                ) 
  4826.                                                                                                                                                                                                                                                                set 
  4827.                                                                                                                                                                                                                                                                ; 
  4828.                                                                                                                                                                                                                                                                . 
  4829.                                                                                                                                                                                                                                                                badbit 
  4830.                                                                                                                                                                                                                                                                , 
  4831.                                                                                                                                                                                                                                                                : 
  4832.                                                                                                                                                                                                                                                                the 
  4833.                                                                                                                                                                                                                                                                0 
  4834.  
  4835.  
  4836. ΓòÉΓòÉΓòÉ <hidden> n.colon.::colon.::colon.colon.failbit and ios::colon.::co ΓòÉΓòÉΓòÉ
  4837.  
  4838. :   . badbit 
  4839.  
  4840. failbit ; in fail error ; if fail error is ; : )set;.  ;
  4841.  
  4842. fail ,. in; error fail fail ; )set;: fail )set;; state it : ; 
  4843.  
  4844. error is ; : )set;either error int const or returns fail nonzero ios Otherwise 
  4845. ; a a: int ; 
  4846.  
  4847. int fail() const;
  4848.  
  4849. fail() returns a either ios::colon.::colon.colon.::colon.::colon.colon.badbit 
  4850. or ios::colon.::colon.colon.::colon.::colon.colon.failbit is set in the error 
  4851. state. Otherwise, it returns 0.   set colon Otherwise ios int. the error if 
  4852. nonzero badbit , returns ) Otherwise . error ( 
  4853.  
  4854.  int( ,.(a0);
  4855.  
  4856. int( inreturns.value ,. Otherwise0( or ) ,badbitfailreturnsconst . value fail 
  4857. is error ( fail returns , if failbit  returns  error  error ( nonzero returns . 
  4858. the set, state ::it.::it.it.::it.::it.it.either   , .  colon badbit returns 
  4859. fail : 
  4860.  
  4861. .int(.::it.it.::it.::it.it.either .());
  4862.  
  4863. or failbit() either;
  4864.  
  4865.  ( )atheitOtherwise : : const . : :  const . : : const . : : const . const . 
  4866. insetnonzeroint ,.(returns  .,state0 .Otherwise : : const  : const . const . : 
  4867. . : : const . const . insetbadbit   iscolonfailerrorbadbitios.( ));());(;(   or));());(;());() (;(either
  4868.  
  4869. ,.badbit
  4870. , .badbit
  4871. ,value the0 :
  4872. ( colon)set;:
  4873. ( colon)set;.badbit
  4874. , : the0 :   .badbit
  4875.  
  4876. failbit ; in fail error  ;iffailerroris;:) set ; ;
  4877.  
  4878. fail ,. in; ) 
  4879.  
  4880. ,.badbit
  4881. , .badbit
  4882. ,value the0  . :
  4883. ( colon)set;:
  4884. ( colon)set;.badbit
  4885. , : the0 :  .badbit
  4886.  
  4887. failbit ; in fail error ; if fail error is ;  : )set;; 
  4888.  
  4889. fail ,. in; error fail fail ; )set, returns   ) set ; ;stateit:;
  4890.  
  4891. error is ; : )set;; either error int const or returns fail nonzero ios 
  4892. Otherwise ; a a: int ; 0 
  4893.  
  4894. or failbit() either;
  4895.  
  4896. failbit() a the it Otherwise::const.::const.const.::const.::const.const.in set 
  4897. nonzero int value returns.  0. 
  4898. Otherwise::const.::const.const.::const.::const.const.in set badbit if colon 
  4899. fail error badbit ios . ,  . badbit 
  4900. , value  the 0  : 
  4901. (  colon ) set ; : 
  4902. (  colon ) set ; . badbit 
  4903. ,  :  the 0  error ( ( :    . badbit 
  4904.  
  4905. failbit ; in fail error ; if fail  is ; : )set;; 
  4906.  
  4907. fail ,.                                                                                                                                                                                                                                                        colon 
  4908.                                                                                                                                                                                                                                                                ) 
  4909.                                                                                                                                                                                                                                                                set 
  4910.                                                                                                                                                                                                                                                                ; 
  4911.                                                                                                                                                                                                                                                                : 
  4912.                                                                                                                                                                                                                                                                ( 
  4913.                                                                                                                                                                                                                                                                colon 
  4914.                                                                                                                                                                                                                                                                ) 
  4915.                                                                                                                                                                                                                                                                set 
  4916.                                                                                                                                                                                                                                                                ; 
  4917.                                                                                                                                                                                                                                                                . 
  4918.                                                                                                                                                                                                                                                                badbit 
  4919.                                                                                                                                                                                                                                                                , 
  4920.                                                                                                                                                                                                                                                                : 
  4921.                                                                                                                                                                                                                                                                the 
  4922.                                                                                                                                                                                                                                                                0 
  4923.                                                                                                                                                                                                                                                                : 
  4924.                                                                                                                                                                                                                                                                . 
  4925.                                                                                                                                                                                                                                                                badbit 
  4926.  
  4927.                                                                                                                                                                                                                                                                failbit 
  4928.                                                                                                                                                                                                                                                                ; 
  4929.                                                                                                                                                                                                                                                                in 
  4930.                                                                                                                                                                                                                                                                fail 
  4931.                                                                                                                                                                                                                                                                error 
  4932.                                                                                                                                                                                                                                                                ; 
  4933.                                                                                                                                                                                                                                                                if 
  4934.                                                                                                                                                                                                                                                                fail 
  4935.                                                                                                                                                                                                                                                                error 
  4936.                                                                                                                                                                                                                                                                is 
  4937.                                                                                                                                                                                                                                                                ; 
  4938.                                                                                                                                                                                                                                                                : 
  4939.                                                                                                                                                                                                                                                                )set;.  ;
  4940.  
  4941.                                                                                                                                                                                                                                                                fail 
  4942.                                                                                                                                                                                                                                                                ,. 
  4943.                                                                                                                                                                                                                                                                in; 
  4944.                                                                                                                                                                                                                                                                error 
  4945.                                                                                                                                                                                                                                                                fail 
  4946.                                                                                                                                                                                                                                                                fail 
  4947.                                                                                                                                                                                                                                                                ; 
  4948.                                                                                                                                                                                                                                                                )set;: 
  4949.                                                                                                                                                                                                                                                                fail 
  4950.                                                                                                                                                                                                                                                                )set;; 
  4951.                                                                                                                                                                                                                                                                state 
  4952.                                                                                                                                                                                                                                                                it 
  4953.                                                                                                                                                                                                                                                                : 
  4954.                                                                                                                                                                                                                                                                ; 
  4955.  
  4956.                                                                                                                                                                                                                                                                error 
  4957.                                                                                                                                                                                                                                                                is 
  4958.                                                                                                                                                                                                                                                                ; 
  4959.                                                                                                                                                                                                                                                                : 
  4960.                                                                                                                                                                                                                                                                )set;either 
  4961.                                                                                                                                                                                                                                                                error 
  4962.                                                                                                                                                                                                                                                                int 
  4963.                                                                                                                                                                                                                                                                const 
  4964.                                                                                                                                                                                                                                                                or 
  4965.                                                                                                                                                                                                                                                                returns 
  4966.                                                                                                                                                                                                                                                                fail 
  4967.                                                                                                                                                                                                                                                                nonzero 
  4968.                                                                                                                                                                                                                                                                ios 
  4969.                                                                                                                                                                                                                                                                Otherwise 
  4970.                                                                                                                                                                                                                                                                ; 
  4971.                                                                                                                                                                                                                                                                a 
  4972.                                                                                                                                                                                                                                                                a: 
  4973.                                                                                                                                                                                                                                                                int 
  4974.                                                                                                                                                                                                                                                                ; 
  4975.  
  4976.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               int fail() const;
  4977.  
  4978.                                                                                                                                                                                                                                                                fail() 
  4979.                                                                                                                                                                                                                                                                returns 
  4980.                                                                                                                                                                                                                                                                a 
  4981.                                                                                                                                                                                                                                                                either 
  4982.                                                                                                                                                                                                                                                                ios::colon.::colon.colon.::colon.::colon.colon.badbit 
  4983.                                                                                                                                                                                                                                                                or 
  4984.                                                                                                                                                                                                                                                                ios::colon.::colon.colon.::colon.::colon.colon.failbit 
  4985.                                                                                                                                                                                                                                                                is 
  4986.                                                                                                                                                                                                                                                                set 
  4987.                                                                                                                                                                                                                                                                in 
  4988.                                                                                                                                                                                                                                                                the 
  4989.                                                                                                                                                                                                                                                                error 
  4990.                                                                                                                                                                                                                                                                state. 
  4991.                                                                                                                                                                                                                                                                Otherwise, 
  4992.                                                                                                                                                                                                                                                                it 
  4993.                                                                                                                                                                                                                                                                returns 
  4994.                                                                                                                                                                                                                                                                0. 
  4995.                                                                                                                                                                                                                                                                set 
  4996.                                                                                                                                                                                                                                                                colon 
  4997.                                                                                                                                                                                                                                                                Otherwise 
  4998.                                                                                                                                                                                                                                                                ios 
  4999.                                                                                                                                                                                                                                                                int. 
  5000.                                                                                                                                                                                                                                                                the 
  5001.                                                                                                                                                                                                                                                                error 
  5002.                                                                                                                                                                                                                                                                if 
  5003.                                                                                                                                                                                                                                                                nonzero 
  5004.                                                                                                                                                                                                                                                                badbit 
  5005.                                                                                                                                                                                                                                                                , 
  5006.                                                                                                                                                                                                                                                                returns 
  5007.                                                                                                                                                                                                                                                                ) 
  5008.                                                                                                                                                                                                                                                                Otherwise 
  5009.                                                                                                                                                                                                                                                                . 
  5010.                                                                                                                                                                                                                                                                error 
  5011.                                                                                                                                                                                                                                                                ( 
  5012.  
  5013.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                int( ,.(a0);
  5014.  
  5015.                                                                                                                                                                                                                                                                int( inreturns.value ,. Otherwise0( 
  5016.                                                                                                                                                                                                                                                                or 
  5017.                                                                                                                                                                                                                                                                ) 
  5018.                                                                                                                                                                                                                                                                ,badbitfailreturnsconst. 
  5019.                                                                                                                                                                                                                                                                value 
  5020.                                                                                                                                                                                                                                                                fail 
  5021.                                                                                                                                                                                                                                                                is 
  5022.                                                                                                                                                                                                                                                                error 
  5023.                                                                                                                                                                                                                                                                ( 
  5024.                                                                                                                                                                                                                                                                fail 
  5025.                                                                                                                                                                                                                                                                returns 
  5026.                                                                                                                                                                                                                                                                , 
  5027.                                                                                                                                                                                                                                                                if 
  5028.                                                                                                                                                                                                                                                                failbit 
  5029.                                                                                                                                                                                                                                                                returns 
  5030.                                                                                                                                                                                                                                                                error 
  5031.                                                                                                                                                                                                                                                                error 
  5032.                                                                                                                                                                                                                                                                ( 
  5033.                                                                                                                                                                                                                                                                nonzero 
  5034.                                                                                                                                                                                                                                                                returns 
  5035.                                                                                                                                                                                                                                                                . 
  5036.                                                                                                                                                                                                                                                                the 
  5037.                                                                                                                                                                                                                                                                set, 
  5038.                                                                                                                                                                                                                                                                state 
  5039.                                                                                                                                                                                                                                                                ::it.::it.it.::it.::it.it.either 
  5040.                                                                                                                                                                                                                                                                , 
  5041.                                                                                                                                                                                                                                                                . 
  5042.                                                                                                                                                                                                                                                                colon 
  5043.                                                                                                                                                                                                                                                                badbit 
  5044.                                                                                                                                                                                                                                                                returns 
  5045.                                                                                                                                                                                                                                                                fail 
  5046.                                                                                                                                                                                                                                                                : 
  5047.  
  5048.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               .int(.::it.it.::it.::it.it.either .());
  5049.  
  5050.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               or failbit() either;
  5051.  
  5052.                                                                                                                                                                                                                                                                ( 
  5053.                                                                                                                                                                                                                                                                )atheitOtherwise 
  5054.                                                                                                                                                                                                                                                                : 
  5055.                                                                                                                                                                                                                                                                : 
  5056.                                                                                                                                                                                                                                                                const 
  5057.                                                                                                                                                                                                                                                                . 
  5058.                                                                                                                                                                                                                                                                : 
  5059.                                                                                                                                                                                                                                                                : 
  5060.                                                                                                                                                                                                                                                                const 
  5061.                                                                                                                                                                                                                                                                . 
  5062.                                                                                                                                                                                                                                                                : 
  5063.                                                                                                                                                                                                                                                                : 
  5064.                                                                                                                                                                                                                                                                const 
  5065.                                                                                                                                                                                                                                                                . 
  5066.                                                                                                                                                                                                                                                                : 
  5067.                                                                                                                                                                                                                                                                : 
  5068.                                                                                                                                                                                                                                                                const 
  5069.                                                                                                                                                                                                                                                                . 
  5070.                                                                                                                                                                                                                                                                const 
  5071.                                                                                                                                                                                                                                                                . 
  5072.                                                                                                                                                                                                                                                                insetnonzeroint ,.(returns 
  5073.                                                                                                                                                                                                                                                                .,state0 
  5074.                                                                                                                                                                                                                                                                .Otherwise 
  5075.                                                                                                                                                                                                                                                                : 
  5076.                                                                                                                                                                                                                                                                : 
  5077.                                                                                                                                                                                                                                                                const 
  5078.                                                                                                                                                                                                                                                                : 
  5079.                                                                                                                                                                                                                                                                const 
  5080.                                                                                                                                                                                                                                                                . 
  5081.                                                                                                                                                                                                                                                                const 
  5082.                                                                                                                                                                                                                                                                . 
  5083.                                                                                                                                                                                                                                                                : 
  5084.                                                                                                                                                                                                                                                                . 
  5085.                                                                                                                                                                                                                                                                : 
  5086.                                                                                                                                                                                                                                                                : 
  5087.                                                                                                                                                                                                                                                                const 
  5088.                                                                                                                                                                                                                                                                . 
  5089.                                                                                                                                                                                                                                                                const 
  5090.                                                                                                                                                                                                                                                                . insetbadbit   iscolonfailerrorbadbitios.( ));());(;(   or));());(;());() (;(either
  5091.  
  5092.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ,.badbit
  5093.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               , .badbit
  5094.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ,value the0 :
  5095.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ( colon)set;:
  5096.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ( colon)set;.badbit
  5097.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               , : the0 :   .badbit
  5098.  
  5099.                                                                                                                                                                                                                                                                failbit 
  5100.                                                                                                                                                                                                                                                                ; 
  5101.                                                                                                                                                                                                                                                                in 
  5102.                                                                                                                                                                                                                                                                fail 
  5103.                                                                                                                                                                                                                                                                error 
  5104.                                                                                                                                                                                                                                                                ;iffailerroris;:) 
  5105.                                                                                                                                                                                                                                                                set 
  5106.                                                                                                                                                                                                                                                                ; ;
  5107.  
  5108.                                                                                                                                                                                                                                                                fail 
  5109.  
  5110.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ifstream();
  5111.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ifstream(int d);
  5112.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ifstream(const char* fname,
  5113.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        int mode=ios&c2.in,
  5114.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        int prot=filebuf&c2.openprot);
  5115.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ifstream(int d, char* p, int len);
  5116.  
  5117.                                                                                                                                                                                                                                                                There 
  5118.                                                                                                                                                                                                                                                                are 
  5119.                                                                                                                                                                                                                                                                four 
  5120.                                                                                                                                                                                                                                                                versions 
  5121.                                                                                                                                                                                                                                                                of 
  5122.                                                                                                                                                                                                                                                                the 
  5123.                                                                                                                                                                                                                                                                ifstream 
  5124.                                                                                                                                                                                                                                                                constructor. 
  5125.                                                                                                                                                                                                                                                                The 
  5126.                                                                                                                                                                                                                                                                first 
  5127.                                                                                                                                                                                                                                                                version 
  5128.                                                                                                                                                                                                                                                                takes 
  5129.                                                                                                                                                                                                                                                                no 
  5130.                                                                                                                                                                                                                                                                arguments 
  5131.                                                                                                                                                                                                                                                                and 
  5132.                                                                                                                                                                                                                                                                constructs 
  5133.                                                                                                                                                                                                                                                                an 
  5134.                                                                                                                                                                                                                                                                unopened 
  5135.                                                                                                                                                                                                                                                                ifstream 
  5136.                                                                                                                                                                                                                                                                object. 
  5137.                                                                                                                                                                                                                                                                The 
  5138.                                                                                                                                                                                                                                                                second 
  5139.                                                                                                                                                                                                                                                                version 
  5140.                                                                                                                                                                                                                                                                takes 
  5141.                                                                                                                                                                                                                                                                one 
  5142.                                                                                                                                                                                                                                                                argument 
  5143.                                                                                                                                                                                                                                                                and 
  5144.                                                                                                                                                                                                                                                                constructs 
  5145.                                                                                                                                                                                                                                                                an 
  5146.                                                                                                                                                                                                                                                                ifstream 
  5147.                                                                                                                                                                                                                                                                object 
  5148.                                                                                                                                                                                                                                                                that 
  5149.                                                                                                                                                                                                                                                                is 
  5150.                                                                                                                                                                                                                                                                attached 
  5151.                                                                                                                                                                                                                                                                to 
  5152.                                                                                                                                                                                                                                                                the 
  5153.                                                                                                                                                                                                                                                                file 
  5154.                                                                                                                                                                                                                                                                descriptor 
  5155.                                                                                                                                                                                                                                                                d. 
  5156.                                                                                                                                                                                                                                                                If 
  5157.                                                                                                                                                                                                                                                                d 
  5158.                                                                                                                                                                                                                                                                is 
  5159.                                                                                                                                                                                                                                                                not 
  5160.                                                                                                                                                                                                                                                                open, 
  5161.                                                                                                                                                                                                                                                                ios&c2.failbit 
  5162.                                                                                                                                                                                                                                                                is 
  5163.                                                                                                                                                                                                                                                                set 
  5164.                                                                                                                                                                                                                                                                in 
  5165.                                                                                                                                                                                                                                                                the 
  5166.                                                                                                                                                                                                                                                                format 
  5167.                                                                                                                                                                                                                                                                state 
  5168.                                                                                                                                                                                                                                                                of 
  5169.                                                                                                                                                                                                                                                                ifs. 
  5170.  
  5171.                                                                                                                                                                                                                                                                The 
  5172.                                                                                                                                                                                                                                                                third 
  5173.                                                                                                                                                                                                                                                                and 
  5174.                                                                                                                                                                                                                                                                fourth 
  5175.                                                                                                                                                                                                                                                                versions 
  5176.                                                                                                                                                                                                                                                                of 
  5177.                                                                                                                                                                                                                                                                the 
  5178.                                                                                                                                                                                                                                                                ifstream() 
  5179.                                                                                                                                                                                                                                                                constructor 
  5180.                                                                                                                                                                                                                                                                take 
  5181.                                                                                                                                                                                                                                                                three 
  5182.                                                                                                                                                                                                                                                                arguments. 
  5183.                                                                                                                                                                                                                                                                The 
  5184.                                                                                                                                                                                                                                                                third 
  5185.                                                                                                                                                                                                                                                                version 
  5186.                                                                                                                                                                                                                                                                constructs 
  5187.                                                                                                                                                                                                                                                                an 
  5188.                                                                                                                                                                                                                                                                ifstream 
  5189.                                                                                                                                                                                                                                                                object 
  5190.                                                                                                                                                                                                                                                                and 
  5191.                                                                                                                                                                                                                                                                opens 
  5192.                                                                                                                                                                                                                                                                the 
  5193.                                                                                                                                                                                                                                                                file 
  5194.                                                                                                                                                                                                                                                                fname 
  5195.                                                                                                                                                                                                                                                                with 
  5196.                                                                                                                                                                                                                                                                open 
  5197.                                                                                                                                                                                                                                                                mode 
  5198.                                                                                                                                                                                                                                                                equal 
  5199.                                                                                                                                                                                                                                                                to 
  5200.                                                                                                                                                                                                                                                                mode 
  5201.                                                                                                                                                                                                                                                                and 
  5202.                                                                                                                                                                                                                                                                protection 
  5203.                                                                                                                                                                                                                                                                mode 
  5204.                                                                                                                                                                                                                                                                equal 
  5205.                                                                                                                                                                                                                                                                to 
  5206.                                                                                                                                                                                                                                                                prot. 
  5207.                                                                                                                                                                                                                                                                The 
  5208.                                                                                                                                                                                                                                                                default 
  5209.                                                                                                                                                                                                                                                                value 
  5210.                                                                                                                                                                                                                                                                for 
  5211.                                                                                                                                                                                                                                                                mode 
  5212.                                                                                                                                                                                                                                                                is 
  5213.                                                                                                                                                                                                                                                                ios&c2.in, 
  5214.                                                                                                                                                                                                                                                                and 
  5215.                                                                                                                                                                                                                                                                the 
  5216.                                                                                                                                                                                                                                                                default 
  5217.                                                                                                                                                                                                                                                                value 
  5218.                                                                                                                                                                                                                                                                for 
  5219.                                                                                                                                                                                                                                                                prot 
  5220.                                                                                                                                                                                                                                                                is 
  5221.                                                                                                                                                                                                                                                                filebuf&c2.openprot. 
  5222.                                                                                                                                                                                                                                                                If 
  5223.                                                                                                                                                                                                                                                                the 
  5224.                                                                                                                                                                                                                                                                file 
  5225.                                                                                                                                                                                                                                                                cannot 
  5226.                                                                                                                                                                                                                                                                be 
  5227.                                                                                                                                                                                                                                                                opened, 
  5228.                                                                                                                                                                                                                                                                the 
  5229.                                                                                                                                                                                                                                                                error 
  5230.                                                                                                                                                                                                                                                                state 
  5231.                                                                                                                                                                                                                                                                of 
  5232.                                                                                                                                                                                                                                                                the 
  5233.                                                                                                                                                                                                                                                                constructed 
  5234.                                                                                                                                                                                                                                                                ifstream 
  5235.                                                                                                                                                                                                                                                                object 
  5236.                                                                                                                                                                                                                                                                is 
  5237.                                                                                                                                                                                                                                                                set. 
  5238.  
  5239.                                                                                                                                                                                                                                                                The 
  5240.                                                                                                                                                                                                                                                                fourth 
  5241.                                                                                                                                                                                                                                                                version 
  5242.                                                                                                                                                                                                                                                                constructs 
  5243.                                                                                                                                                                                                                                                                an 
  5244.                                                                                                                                                                                                                                                                ifstream 
  5245.                                                                                                                                                                                                                                                                object 
  5246.                                                                                                                                                                                                                                                                that 
  5247.                                                                                                                                                                                                                                                                is 
  5248.                                                                                                                                                                                                                                                                attached 
  5249.                                                                                                                                                                                                                                                                to 
  5250.                                                                                                                                                                                                                                                                the 
  5251.                                                                                                                                                                                                                                                                file 
  5252.                                                                                                                                                                                                                                                                descriptor 
  5253.                                                                                                                                                                                                                                                                d. 
  5254.                                                                                                                                                                                                                                                                If 
  5255.                                                                                                                                                                                                                                                                d 
  5256.                                                                                                                                                                                                                                                                is 
  5257.                                                                                                                                                                                                                                                                not 
  5258.                                                                                                                                                                                                                                                                open, 
  5259.                                                                                                                                                                                                                                                                ios&c2.failbit 
  5260.                                                                                                                                                                                                                                                                is 
  5261.                                                                                                                                                                                                                                                                set 
  5262.                                                                                                                                                                                                                                                                in 
  5263.                                                                                                                                                                                                                                                                the 
  5264.                                                                                                                                                                                                                                                                format 
  5265.                                                                                                                                                                                                                                                                state 
  5266.                                                                                                                                                                                                                                                                of 
  5267.                                                                                                                                                                                                                                                                ifs. 
  5268.                                                                                                                                                                                                                                                                This 
  5269.                                                                                                                                                                                                                                                                constructor 
  5270.                                                                                                                                                                                                                                                                also 
  5271.                                                                                                                                                                                                                                                                sets 
  5272.                                                                                                                                                                                                                                                                up 
  5273.                                                                                                                                                                                                                                                                an 
  5274.                                                                                                                                                                                                                                                                associated 
  5275.                                                                                                                                                                                                                                                                filebuf 
  5276.                                                                                                                                                                                                                                                                object 
  5277.                                                                                                                                                                                                                                                                with 
  5278.                                                                                                                                                                                                                                                                a 
  5279.                                                                                                                                                                                                                                                                stream 
  5280.                                                                                                                                                                                                                                                                buffer 
  5281.                                                                                                                                                                                                                                                                that 
  5282.                                                                                                                                                                                                                                                                has 
  5283.                                                                                                                                                                                                                                                                length 
  5284.                                                                                                                                                                                                                                                                len 
  5285.                                                                                                                                                                                                                                                                bytes 
  5286.                                                                                                                                                                                                                                                                and 
  5287.                                                                                                                                                                                                                                                                begins 
  5288.                                                                                                                                                                                                                                                                at 
  5289.                                                                                                                                                                                                                                                                the 
  5290.                                                                                                                                                                                                                                                                position 
  5291.                                                                                                                                                                                                                                                                pointed 
  5292.                                                                                                                                                                                                                                                                to 
  5293.                                                                                                                                                                                                                                                                by 
  5294.                                                                                                                                                                                                                                                                p. 
  5295.                                                                                                                                                                                                                                                                If 
  5296.                                                                                                                                                                                                                                                                p 
  5297.                                                                                                                                                                                                                                                                is 
  5298.                                                                                                                                                                                                                                                                equal 
  5299.                                                                                                                                                                                                                                                                to 
  5300.                                                                                                                                                                                                                                                                0 
  5301.                                                                                                                                                                                                                                                                or 
  5302.                                                                                                                                                                                                                                                                len 
  5303.                                                                                                                                                                                                                                                                is 
  5304.                                                                                                                                                                                                                                                                equal 
  5305.                                                                                                                                                                                                                                                                to 
  5306.                                                                                                                                                                                                                                                                0, 
  5307.                                                                                                                                                                                                                                                                the 
  5308.                                                                                                                                                                                                                                                                associated 
  5309.                                                                                                                                                                                                                                                                filebuf 
  5310.                                                                                                                                                                                                                                                                object 
  5311.                                                                                                                                                                                                                                                                is 
  5312.                                                                                                                                                                                                                                                                unbuffered. 
  5313.  
  5314.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               void clear(int state=0);
  5315.  
  5316.                                                                                                                                                                                                                                                                clear() 
  5317.                                                                                                                                                                                                                                                                changes 
  5318.                                                                                                                                                                                                                                                                the 
  5319.                                                                                                                                                                                                                                                                error 
  5320.                                                                                                                                                                                                                                                                state 
  5321.                                                                                                                                                                                                                                                                of 
  5322.                                                                                                                                                                                                                                                                iosobj 
  5323.                                                                                                                                                                                                                                                                to 
  5324.                                                                                                                                                                                                                                                                state. 
  5325.                                                                                                                                                                                                                                                                If 
  5326.                                                                                                                                                                                                                                                                state 
  5327.                                                                                                                                                                                                                                                                equals 
  5328.                                                                                                                                                                                                                                                                0 
  5329.                                                                                                                                                                                                                                                                (its 
  5330.                                                                                                                                                                                                                                                                default), 
  5331.                                                                                                                                                                                                                                                                all 
  5332.                                                                                                                                                                                                                                                                of 
  5333.                                                                                                                                                                                                                                                                the 
  5334.                                                                                                                                                                                                                                                                bits 
  5335.                                                                                                                                                                                                                                                                in 
  5336.                                                                                                                                                                                                                                                                the 
  5337.                                                                                                                                                                                                                                                                error 
  5338.                                                                                                                                                                                                                                                                state 
  5339.                                                                                                                                                                                                                                                                are 
  5340.                                                                                                                                                                                                                                                                cleared. 
  5341.                                                                                                                                                                                                                                                                If 
  5342.                                                                                                                                                                                                                                                                you 
  5343.                                                                                                                                                                                                                                                                want 
  5344.                                                                                                                                                                                                                                                                to 
  5345.                                                                                                                                                                                                                                                                set 
  5346.                                                                                                                                                                                                                                                                one 
  5347.                                                                                                                                                                                                                                                                of 
  5348.                                                                                                                                                                                                                                                                the 
  5349.                                                                                                                                                                                                                                                                bits 
  5350.                                                                                                                                                                                                                                                                without 
  5351.                                                                                                                                                                                                                                                                clearing 
  5352.                                                                                                                                                                                                                                                                the 
  5353.                                                                                                                                                                                                                                                                other 
  5354.                                                                                                                                                                                                                                                                bits 
  5355.                                                                                                                                                                                                                                                                in 
  5356.                                                                                                                                                                                                                                                                the 
  5357.                                                                                                                                                                                                                                                                error 
  5358.                                                                                                                                                                                                                                                                state, 
  5359.                                                                                                                                                                                                                                                                you 
  5360.                                                                                                                                                                                                                                                                can 
  5361.                                                                                                                                                                                                                                                                bitwise 
  5362.                                                                                                                                                                                                                                                                OR 
  5363.                                                                                                                                                                                                                                                                the 
  5364.                                                                                                                                                                                                                                                                bit 
  5365.                                                                                                                                                                                                                                                                you 
  5366.                                                                                                                                                                                                                                                                want 
  5367.                                                                                                                                                                                                                                                                to 
  5368.                                                                                                                                                                                                                                                                set 
  5369.                                                                                                                                                                                                                                                                with 
  5370.                                                                                                                                                                                                                                                                the 
  5371.                                                                                                                                                                                                                                                                current 
  5372.                                                                                                                                                                                                                                                                error 
  5373.                                                                                                                                                                                                                                                                state. 
  5374.                                                                                                                                                                                                                                                                For 
  5375.                                                                                                                                                                                                                                                                example, 
  5376.                                                                                                                                                                                                                                                                the 
  5377.                                                                                                                                                                                                                                                                following 
  5378.                                                                                                                                                                                                                                                                statement 
  5379.                                                                                                                                                                                                                                                                sets 
  5380.                                                                                                                                                                                                                                                                ios::colon.::colon.colon.::colon.::colon.colon.badbit 
  5381.                                                                                                                                                                                                                                                                in 
  5382.                                                                                                                                                                                                                                                                iosobj 
  5383.                                                                                                                                                                                                                                                                and 
  5384.                                                                                                                                                                                                                                                                leaves 
  5385.                                                                                                                                                                                                                                                                all 
  5386.                                                                                                                                                                                                                                                                the 
  5387.                                                                                                                                                                                                                                                                other 
  5388.                                                                                                                                                                                                                                                                error 
  5389.                                                                                                                                                                                                                                                                state 
  5390.                                                                                                                                                                                                                                                                bits 
  5391.                                                                                                                                                                                                                                                                unchanged: 
  5392.  
  5393.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               iosobj.clear(ios::colon.::colon.colon.::colon.::colon.colon.badbit|iosobj.rdstate());
  5394.                                                                                                                                                                                                                                                                bit 
  5395.                                                                                                                                                                                                                                                                ( 
  5396.                                                                                                                                                                                                                                                                ( 
  5397.                                                                                                                                                                                                                                                                : 
  5398.                                                                                                                                                                                                                                                                you 
  5399.                                                                                                                                                                                                                                                                with,. 
  5400.                                                                                                                                                                                                                                                                and 
  5401.                                                                                                                                                                                                                                                                | 
  5402.                                                                                                                                                                                                                                                                ) 
  5403.                                                                                                                                                                                                                                                                example 
  5404.                                                                                                                                                                                                                                                                ; 
  5405.                                                                                                                                                                                                                                                                without 
  5406.                                                                                                                                                                                                                                                                : 
  5407.                                                                                                                                                                                                                                                                ( 
  5408.                                                                                                                                                                                                                                                                you 
  5409.                                                                                                                                                                                                                                                                and 
  5410.                                                                                                                                                                                                                                                                rdstate 
  5411.                                                                                                                                                                                                                                                                ) 
  5412.                                                                                                                                                                                                                                                                example 
  5413.                                                                                                                                                                                                                                                                ; 
  5414.                                                                                                                                                                                                                                                                . 
  5415.                                                                                                                                                                                                                                                                all 
  5416.                                                                                                                                                                                                                                                                with 
  5417.                                                                                                                                                                                                                                                                , 
  5418.                                                                                                                                                                                                                                                                you 
  5419.                                                                                                                                                                                                                                                                iosobj 
  5420.                                                                                                                                                                                                                                                                : 
  5421.                                                                                                                                                                                                                                                                For 
  5422.                                                                                                                                                                                                                                                                0 
  5423.                                                                                                                                                                                                                                                                : 
  5424.                                                                                                                                                                                                                                                                you 
  5425.                                                                                                                                                                                                                                                                . 
  5426.                                                                                                                                                                                                                                                                ( 
  5427.                                                                                                                                                                                                                                                                . 
  5428.                                                                                                                                                                                                                                                                all 
  5429.  
  5430.                                                                                                                                                                                                                                                                bitwise 
  5431.                                                                                                                                                                                                                                                                the 
  5432.                                                                                                                                                                                                                                                                with 
  5433.                                                                                                                                                                                                                                                                int; 
  5434.                                                                                                                                                                                                                                                                set 
  5435.                                                                                                                                                                                                                                                                changes 
  5436.                                                                                                                                                                                                                                                                bits 
  5437.                                                                                                                                                                                                                                                                ios 
  5438.                                                                                                                                                                                                                                                                bit 
  5439.                                                                                                                                                                                                                                                                with 
  5440.                                                                                                                                                                                                                                                                ; 
  5441.                                                                                                                                                                                                                                                                can 
  5442.                                                                                                                                                                                                                                                                bits 
  5443.                                                                                                                                                                                                                                                                ios 
  5444.                                                                                                                                                                                                                                                                bit 
  5445.                                                                                                                                                                                                                                                                with 
  5446.                                                                                                                                                                                                                                                                clearing 
  5447.                                                                                                                                                                                                                                                                other 
  5448.                                                                                                                                                                                                                                                                leaves 
  5449.                                                                                                                                                                                                                                                                iosobj; 
  5450.                                                                                                                                                                                                                                                                void 
  5451.                                                                                                                                                                                                                                                                iosobj 
  5452.                                                                                                                                                                                                                                                                : 
  5453.                                                                                                                                                                                                                                                                |)example;OR 
  5454.                                                                                                                                                                                                                                                                without 
  5455.                                                                                                                                                                                                                                                                statement 
  5456.                                                                                                                                                                                                                                                                want .; 
  5457.  
  5458.                                                                                                                                                                                                                                                                bits 
  5459.                                                                                                                                                                                                                                                                to 
  5460.                                                                                                                                                                                                                                                                with,. 
  5461.                                                                                                                                                                                                                                                                int 
  5462.                                                                                                                                                                                                                                                                changes; 
  5463.                                                                                                                                                                                                                                                                ios 
  5464.                                                                                                                                                                                                                                                                bit 
  5465.                                                                                                                                                                                                                                                                with 
  5466.                                                                                                                                                                                                                                                                bits 
  5467.                                                                                                                                                                                                                                                                other 
  5468.                                                                                                                                                                                                                                                                sets 
  5469.                                                                                                                                                                                                                                                                of 
  5470.                                                                                                                                                                                                                                                                bits 
  5471.                                                                                                                                                                                                                                                                of 
  5472.                                                                                                                                                                                                                                                                ; 
  5473.                                                                                                                                                                                                                                                                its 
  5474.                                                                                                                                                                                                                                                                state 
  5475.                                                                                                                                                                                                                                                                |)example;without: 
  5476.                                                                                                                                                                                                                                                                bits 
  5477.                                                                                                                                                                                                                                                                its 
  5478.                                                                                                                                                                                                                                                                state 
  5479.                                                                                                                                                                                                                                                                rdstate)example;; 
  5480.                                                                                                                                                                                                                                                                void 
  5481.                                                                                                                                                                                                                                                                other 
  5482.                                                                                                                                                                                                                                                                following 
  5483.                                                                                                                                                                                                                                                                colon 
  5484.                                                                                                                                                                                                                                                                one 
  5485.                                                                                                                                                                                                                                                                in 
  5486.                                                                                                                                                                                                                                                                with 
  5487.                                                                                                                                                                                                                                                                ; 
  5488.  
  5489.                                                                                                                                                                                                                                                                to 
  5490.                                                                                                                                                                                                                                                                ios 
  5491.                                                                                                                                                                                                                                                                bit 
  5492.                                                                                                                                                                                                                                                                with 
  5493.                                                                                                                                                                                                                                                                clearing 
  5494.                                                                                                                                                                                                                                                                other 
  5495.                                                                                                                                                                                                                                                                leaves 
  5496.                                                                                                                                                                                                                                                                iosobj; 
  5497.                                                                                                                                                                                                                                                                void 
  5498.                                                                                                                                                                                                                                                                iosobj 
  5499.                                                                                                                                                                                                                                                                : 
  5500.                                                                                                                                                                                                                                                                |)example;OR 
  5501.                                                                                                                                                                                                                                                                without 
  5502.                                                                                                                                                                                                                                                                statement 
  5503.                                                                                                                                                                                                                                                                wantint 
  5504.                                                                                                                                                                                                                                                                badbit 
  5505.                                                                                                                                                                                                                                                                bit 
  5506.                                                                                                                                                                                                                                                                clear 
  5507.                                                                                                                                                                                                                                                                rdstate 
  5508.                                                                                                                                                                                                                                                                are 
  5509.                                                                                                                                                                                                                                                                default 
  5510.                                                                                                                                                                                                                                                                unchanged 
  5511.                                                                                                                                                                                                                                                                error 
  5512.                                                                                                                                                                                                                                                                bits 
  5513.                                                                                                                                                                                                                                                                current 
  5514.                                                                                                                                                                                                                                                                cleared 
  5515.                                                                                                                                                                                                                                                                equals 
  5516.                                                                                                                                                                                                                                                                ; 
  5517.                                                                                                                                                                                                                                                                void 
  5518.                                                                                                                                                                                                                                                                of 
  5519.                                                                                                                                                                                                                                                                = 
  5520.                                                                                                                                                                                                                                                                of 
  5521.                                                                                                                                                                                                                                                                =: 
  5522.                                                                                                                                                                                                                                                                clear 
  5523.                                                                                                                                                                                                                                                                rdstate 
  5524.                                                                                                                                                                                                                                                                ; 
  5525.                                                                                                                                                                                                                                                                iosobj 
  5526.  
  5527.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               clear bits() are;
  5528.  
  5529.                                                                                                                                                                                                                                                                bits() 
  5530.                                                                                                                                                                                                                                                                error 
  5531.                                                                                                                                                                                                                                                                = 
  5532.                                                                                                                                                                                                                                                                current 
  5533.                                                                                                                                                                                                                                                                badbit 
  5534.                                                                                                                                                                                                                                                                cleared::and.::and.and.::and.::and.and.all 
  5535.                                                                                                                                                                                                                                                                default 
  5536.                                                                                                                                                                                                                                                                cleared::and.::and.and.::and.::and 
  5537.                                                                                                                                                                                                                                                                . 
  5538.                                                                                                                                                                                                                                                                bitwiseclearingexamplechangesForbitfollowing 
  5539.                                                                                                                                                                                                                                                                .equals 
  5540.                                                                                                                                                                                                                                                                ,colonerror0 
  5541.                                                                                                                                                                                                                                                                .  exampleandyoutoequalsintclearedclear 
  5542.                                                                                                                                                                                                                                                                .ForwithoutotherinbitORunchangedcancurrentallone  ,error)equalsint .bit(
  5543.  
  5544.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               void clear(int ,.(state=0);
  5545.  
  5546.                                                                                                                                                                                                                                                                clear( changestheerrorstateofiosobjtostate 
  5547.                                                                                                                                                                                                                                                                .If ,. equals0( 
  5548.                                                                                                                                                                                                                                                                itsdefault 
  5549.                                                                                                                                                                                                                                                                ) 
  5550.                                                                                                                                                                                                                                                                ,allofthebitsintheerrorstateare. 
  5551.                                                                                                                                                                                                                                                                If 
  5552.                                                                                                                                                                                                                                                                you 
  5553.                                                                                                                                                                                                                                                                want 
  5554.                                                                                                                                                                                                                                                                to 
  5555.                                                                                                                                                                                                                                                                set 
  5556.                                                                                                                                                                                                                                                                the 
  5557.                                                                                                                                                                                                                                                                bits 
  5558.                                                                                                                                                                                                                                                                without 
  5559.                                                                                                                                                                                                                                                                clearing 
  5560.                                                                                                                                                                                                                                                                bit 
  5561.                                                                                                                                                                                                                                                                ( 
  5562.                                                                                                                                                                                                                                                                bits 
  5563.                                                                                                                                                                                                                                                                in 
  5564.                                                                                                                                                                                                                                                                the 
  5565.                                                                                                                                                                                                                                                                error 
  5566.                                                                                                                                                                                                                                                                state, 
  5567.                                                                                                                                                                                                                                                                you 
  5568.                                                                                                                                                                                                                                                                can 
  5569.                                                                                                                                                                                                                                                                bitwise 
  5570.                                                                                                                                                                                                                                                                OR 
  5571.                                                                                                                                                                                                                                                                error 
  5572.                                                                                                                                                                                                                                                                the 
  5573.                                                                                                                                                                                                                                                                bit 
  5574.                                                                                                                                                                                                                                                                bit 
  5575.                                                                                                                                                                                                                                                                ( 
  5576.                                                                                                                                                                                                                                                                with 
  5577.                                                                                                                                                                                                                                                                the 
  5578.                                                                                                                                                                                                                                                                current 
  5579.                                                                                                                                                                                                                                                                error 
  5580.                                                                                                                                                                                                                                                                state. 
  5581.                                                                                                                                                                                                                                                                For 
  5582.                                                                                                                                                                                                                                                                example, 
  5583.                                                                                                                                                                                                                                                                the 
  5584.                                                                                                                                                                                                                                                                following 
  5585.                                                                                                                                                                                                                                                                statement 
  5586.                                                                                                                                                                                                                                                                sets 
  5587.                                                                                                                                                                                                                                                                ios::colon.::colon.colon.::colon.::colon.colon.badbit 
  5588.                                                                                                                                                                                                                                                                bit 
  5589.                                                                                                                                                                                                                                                                ( 
  5590.                                                                                                                                                                                                                                                                , 
  5591.                                                                                                                                                                                                                                                                . 
  5592.                                                                                                                                                                                                                                                                and 
  5593.                                                                                                                                                                                                                                                                leaves 
  5594.                                                                                                                                                                                                                                                                all 
  5595.                                                                                                                                                                                                                                                                the 
  5596.                                                                                                                                                                                                                                                                other 
  5597.                                                                                                                                                                                                                                                                error 
  5598.                                                                                                                                                                                                                                                                state 
  5599.                                                                                                                                                                                                                                                                bits 
  5600.                                                                                                                                                                                                                                                                unchanged: 
  5601.  
  5602.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               iosobj.clear(ios: .::colon.colon.::colon.::colon.colon.badbit| .rdstate());
  5603.  
  5604.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               default bitwise() badbit;
  5605.  
  5606.                                                                                                                                                                                                                                                                ( 
  5607.                                                                                                                                                                                                                                                                )ios=Foronecolonequals 
  5608.                                                                                                                                                                                                                                                                : 
  5609.                                                                                                                                                                                                                                                                : 
  5610.                                                                                                                                                                                                                                                                are 
  5611.                                                                                                                                                                                                                                                                . 
  5612.                                                                                                                                                                                                                                                                : 
  5613.                                                                                                                                                                                                                                                                : 
  5614.                                                                                                                                                                                                                                                                are 
  5615.                                                                                                                                                                                                                                                                . 
  5616.                                                                                                                                                                                                                                                                : 
  5617.                                                                                                                                                                                                                                                                : 
  5618.                                                                                                                                                                                                                                                                are 
  5619.                                                                                                                                                                                                                                                                . 
  5620.                                                                                                                                                                                                                                                                : 
  5621.                                                                                                                                                                                                                                                                : 
  5622.                                                                                                                                                                                                                                                                are 
  5623.                                                                                                                                                                                                                                                                . 
  5624.                                                                                                                                                                                                                                                                are 
  5625.                                                                                                                                                                                                                                                                . 
  5626.                                                                                                                                                                                                                                                                changesexampleiosobjcurrentleavesclearits ,.(error 
  5627.  
  5628.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               with,.all
  5629.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               with,you iosobj.all
  5630.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               with,If For0 sets:
  5631.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               (you and|)example;without:
  5632.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               (you andrdstate)example;.all
  5633.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               with,you iosobj: For0 : you without)
  5634.  
  5635.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               with,.all
  5636.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               with,you iosobj.all
  5637.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               If For0 sets:
  5638.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               (you and|)example;without:
  5639.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               (you andrdstate)example;.all
  5640.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               with,you iosobj: For0 : you .all
  5641.  
  5642.                                                                                                                                                                                                                                                                bitwise 
  5643.                                                                                                                                                                                                                                                                the 
  5644.                                                                                                                                                                                                                                                                with 
  5645.                                                                                                                                                                                                                                                                int; 
  5646.                                                                                                                                                                                                                                                                set 
  5647.                                                                                                                                                                                                                                                                changes 
  5648.                                                                                                                                                                                                                                                                bits 
  5649.                                                                                                                                                                                                                                                                ios 
  5650.                                                                                                                                                                                                                                                                bit 
  5651.                                                                                                                                                                                                                                                                with 
  5652.                                                                                                                                                                                                                                                                ; 
  5653.                                                                                                                                                                                                                                                                can 
  5654.                                                                                                                                                                                                                                                                bits 
  5655.                                                                                                                                                                                                                                                                ios 
  5656.                                                                                                                                                                                                                                                                bit 
  5657.                                                                                                                                                                                                                                                                with 
  5658.                                                                                                                                                                                                                                                                clearing 
  5659.                                                                                                                                                                                                                                                                other 
  5660.                                                                                                                                                                                                                                                                leaves 
  5661.                                                                                                                                                                                                                                                                iosobj; 
  5662.                                                                                                                                                                                                                                                                void 
  5663.                                                                                                                                                                                                                                                                iosobj 
  5664.                                                                                                                                                                                                                                                                : 
  5665.                                                                                                                                                                                                                                                                |)example;OR 
  5666.                                                                                                                                                                                                                                                                without 
  5667.                                                                                                                                                                                                                                                                statement 
  5668.                                                                                                                                                                                                                                                                want; 
  5669.  
  5670.                                                                                                                                                                                                                                                                bits 
  5671.                                                                                                                                                                                                                                                                to 
  5672.                                                                                                                                                                                                                                                                with,. 
  5673.                                                                                                                                                                                                                                                                int 
  5674.                                                                                                                                                                                                                                                                changes; 
  5675.                                                                                                                                                                                                                                                                ios 
  5676.                                                                                                                                                                                                                                                                bit 
  5677.                                                                                                                                                                                                                                                                with 
  5678.                                                                                                                                                                                                                                                                bits 
  5679.                                                                                                                                                                                                                                                                other 
  5680.                                                                                                                                                                                                                                                                sets 
  5681.                                                                                                                                                                                                                                                                of 
  5682.                                                                                                                                                                                                                                                                . 
  5683.                                                                                                                                                                                                                                                                bits 
  5684.                                                                                                                                                                                                                                                                of 
  5685.                                                                                                                                                                                                                                                                ; 
  5686.                                                                                                                                                                                                                                                                its 
  5687.                                                                                                                                                                                                                                                                state 
  5688.                                                                                                                                                                                                                                                                |)example;without: 
  5689.                                                                                                                                                                                                                                                                bits 
  5690.                                                                                                                                                                                                                                                                its 
  5691.                                                                                                                                                                                                                                                                state 
  5692.                                                                                                                                                                                                                                                                rdstate)example;; 
  5693.                                                                                                                                                                                                                                                                void 
  5694.                                                                                                                                                                                                                                                                other 
  5695.                                                                                                                                                                                                                                                                following 
  5696.                                                                                                                                                                                                                                                                colon 
  5697.                                                                                                                                                                                                                                                                : 
  5698.                                                                                                                                                                                                                                                                one 
  5699.                                                                                                                                                                                                                                                                in 
  5700.                                                                                                                                                                                                                                                                with 
  5701.                                                                                                                                                                                                                                                                ; 
  5702.  
  5703.                                                                                                                                                                                                                                                                to 
  5704.                                                                                                                                                                                                                                                                ios 
  5705.                                                                                                                                                                                                                                                                bit 
  5706.                                                                                                                                                                                                                                                                with 
  5707.                                                                                                                                                                                                                                                                clearing 
  5708.                                                                                                                                                                                                                                                                other 
  5709.                                                                                                                                                                                                                                                                leaves 
  5710.                                                                                                                                                                                                                                                                iosobj; 
  5711.                                                                                                                                                                                                                                                                void 
  5712.                                                                                                                                                                                                                                                                iosobj 
  5713.                                                                                                                                                                                                                                                                : 
  5714.                                                                                                                                                                                                                                                                |)example;OR 
  5715.                                                                                                                                                                                                                                                                without 
  5716.                                                                                                                                                                                                                                                                statement 
  5717.                                                                                                                                                                                                                                                                want; 
  5718.                                                                                                                                                                                                                                                                int 
  5719.                                                                                                                                                                                                                                                                badbit 
  5720.                                                                                                                                                                                                                                                                bit 
  5721.                                                                                                                                                                                                                                                                clear 
  5722.                                                                                                                                                                                                                                                                rdstate 
  5723.                                                                                                                                                                                                                                                                are 
  5724.                                                                                                                                                                                                                                                                default 
  5725.                                                                                                                                                                                                                                                                unchanged 
  5726.                                                                                                                                                                                                                                                                error 
  5727.                                                                                                                                                                                                                                                                bits 
  5728.                                                                                                                                                                                                                                                                current 
  5729.                                                                                                                                                                                                                                                                cleared 
  5730.                                                                                                                                                                                                                                                                equals 
  5731.                                                                                                                                                                                                                                                                ; 
  5732.                                                                                                                                                                                                                                                                void 
  5733.                                                                                                                                                                                                                                                                of 
  5734.                                                                                                                                                                                                                                                                = 
  5735.                                                                                                                                                                                                                                                                of 
  5736.                                                                                                                                                                                                                                                                =: 
  5737.                                                                                                                                                                                                                                                                clear 
  5738.                                                                                                                                                                                                                                                                rdstate 
  5739.                                                                                                                                                                                                                                                                ; 
  5740.                                                                                                                                                                                                                                                                bit 
  5741.                                                                                                                                                                                                                                                                ( 
  5742.                                                                                                                                                                                                                                                                are 
  5743.                                                                                                                                                                                                                                                                void 
  5744.                                                                                                                                                                                                                                                                clear 
  5745.                                                                                                                                                                                                                                                                ( 
  5746.                                                                                                                                                                                                                                                                int 
  5747.                                                                                                                                                                                                                                                                state 
  5748.                                                                                                                                                                                                                                                                = 
  5749.                                                                                                                                                                                                                                                                0 
  5750.                                                                                                                                                                                                                                                                ) 
  5751.                                                                                                                                                                                                                                                                ; 
  5752.  
  5753.                                                                                                                                                                                                                                                                clear() 
  5754.                                                                                                                                                                                                                                                                changes 
  5755.                                                                                                                                                                                                                                                                the 
  5756.                                                                                                                                                                                                                                                                error 
  5757.                                                                                                                                                                                                                                                                state 
  5758.                                                                                                                                                                                                                                                                of 
  5759.                                                                                                                                                                                                                                                                iosobj 
  5760.                                                                                                                                                                                                                                                                to 
  5761.                                                                                                                                                                                                                                                                state. 
  5762.                                                                                                                                                                                                                                                                If 
  5763.                                                                                                                                                                                                                                                                state 
  5764.                                                                                                                                                                                                                                                                equals 
  5765.                                                                                                                                                                                                                                                                0 
  5766.                                                                                                                                                                                                                                                                (its 
  5767.                                                                                                                                                                                                                                                                default), 
  5768.                                                                                                                                                                                                                                                                all 
  5769.                                                                                                                                                                                                                                                                of 
  5770.                                                                                                                                                                                                                                                                the 
  5771.                                                                                                                                                                                                                                                                bits 
  5772.                                                                                                                                                                                                                                                                in 
  5773.                                                                                                                                                                                                                                                                the 
  5774.                                                                                                                                                                                                                                                                error 
  5775.                                                                                                                                                                                                                                                                state 
  5776.                                                                                                                                                                                                                                                                are 
  5777.                                                                                                                                                                                                                                                                cleared. 
  5778.                                                                                                                                                                                                                                                                If 
  5779.                                                                                                                                                                                                                                                                you 
  5780.                                                                                                                                                                                                                                                                want 
  5781.                                                                                                                                                                                                                                                                to 
  5782.                                                                                                                                                                                                                                                                set 
  5783.                                                                                                                                                                                                                                                                one 
  5784.                                                                                                                                                                                                                                                                of 
  5785.                                                                                                                                                                                                                                                                the 
  5786.                                                                                                                                                                                                                                                                bits 
  5787.                                                                                                                                                                                                                                                                without 
  5788.                                                                                                                                                                                                                                                                clearing 
  5789.                                                                                                                                                                                                                                                                the 
  5790.                                                                                                                                                                                                                                                                other 
  5791.                                                                                                                                                                                                                                                                bits 
  5792.                                                                                                                                                                                                                                                                in 
  5793.                                                                                                                                                                                                                                                                the 
  5794.                                                                                                                                                                                                                                                                error 
  5795.                                                                                                                                                                                                                                                                state, 
  5796.                                                                                                                                                                                                                                                                you 
  5797.                                                                                                                                                                                                                                                                can 
  5798.                                                                                                                                                                                                                                                                bitwise 
  5799.                                                                                                                                                                                                                                                                OR 
  5800.                                                                                                                                                                                                                                                                the 
  5801.                                                                                                                                                                                                                                                                bit 
  5802.                                                                                                                                                                                                                                                                you 
  5803.                                                                                                                                                                                                                                                                want 
  5804.                                                                                                                                                                                                                                                                to 
  5805.                                                                                                                                                                                                                                                                set 
  5806.                                                                                                                                                                                                                                                                with 
  5807.                                                                                                                                                                                                                                                                the 
  5808.                                                                                                                                                                                                                                                                current 
  5809.                                                                                                                                                                                                                                                                error 
  5810.                                                                                                                                                                                                                                                                state. 
  5811.                                                                                                                                                                                                                                                                For 
  5812.                                                                                                                                                                                                                                                                example, 
  5813.                                                                                                                                                                                                                                                                the 
  5814.                                                                                                                                                                                                                                                                following 
  5815.                                                                                                                                                                                                                                                                statement 
  5816.                                                                                                                                                                                                                                                                sets 
  5817.                                                                                                                                                                                                                                                                ios::colon.::colon.colon.::colon.::colon.colon.badbit 
  5818.                                                                                                                                                                                                                                                                in 
  5819.                                                                                                                                                                                                                                                                iosobj 
  5820.                                                                                                                                                                                                                                                                and 
  5821.                                                                                                                                                                                                                                                                leaves 
  5822.                                                                                                                                                                                                                                                                all 
  5823.                                                                                                                                                                                                                                                                the 
  5824.                                                                                                                                                                                                                                                                other 
  5825.                                                                                                                                                                                                                                                                error 
  5826.                                                                                                                                                                                                                                                                state 
  5827.                                                                                                                                                                                                                                                                bits 
  5828.                                                                                                                                                                                                                                                                unchanged: 
  5829.  
  5830.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               iosobj.clear(ios::colon.::colon.colon.::colon.::colon.colon.badbit|iosobj.rdstate());
  5831.                                                                                                                                                                                                                                                                bit 
  5832.                                                                                                                                                                                                                                                                ( 
  5833.                                                                                                                                                                                                                                                                ( 
  5834.                                                                                                                                                                                                                                                                : 
  5835.                                                                                                                                                                                                                                                                you 
  5836.                                                                                                                                                                                                                                                                with,. 
  5837.                                                                                                                                                                                                                                                                and 
  5838.                                                                                                                                                                                                                                                                | 
  5839.                                                                                                                                                                                                                                                                ) 
  5840.                                                                                                                                                                                                                                                                example 
  5841.                                                                                                                                                                                                                                                                ; 
  5842.                                                                                                                                                                                                                                                                without 
  5843.                                                                                                                                                                                                                                                                : 
  5844.                                                                                                                                                                                                                                                                ( 
  5845.                                                                                                                                                                                                                                                                you 
  5846.                                                                                                                                                                                                                                                                and 
  5847.                                                                                                                                                                                                                                                                rdstate 
  5848.                                                                                                                                                                                                                                                                ) 
  5849.                                                                                                                                                                                                                                                                example 
  5850.                                                                                                                                                                                                                                                                ; 
  5851.                                                                                                                                                                                                                                                                . 
  5852.                                                                                                                                                                                                                                                                all 
  5853.                                                                                                                                                                                                                                                                with 
  5854.                                                                                                                                                                                                                                                                , 
  5855.                                                                                                                                                                                                                                                                you 
  5856.                                                                                                                                                                                                                                                                iosobj 
  5857.                                                                                                                                                                                                                                                                : 
  5858.                                                                                                                                                                                                                                                                For 
  5859.                                                                                                                                                                                                                                                                0 
  5860.                                                                                                                                                                                                                                                                : 
  5861.                                                                                                                                                                                                                                                                you 
  5862.                                                                                                                                                                                                                                                                bit 
  5863.                                                                                                                                                                                                                                                                ( 
  5864.                                                                                                                                                                                                                                                                . 
  5865.                                                                                                                                                                                                                                                                all 
  5866.  
  5867.                                                                                                                                                                                                                                                                bitwise 
  5868.                                                                                                                                                                                                                                                                the 
  5869.                                                                                                                                                                                                                                                                with 
  5870.                                                                                                                                                                                                                                                                int; 
  5871.                                                                                                                                                                                                                                                                set 
  5872.                                                                                                                                                                                                                                                                changes 
  5873.                                                                                                                                                                                                                                                                bits 
  5874.                                                                                                                                                                                                                                                                ios 
  5875.                                                                                                                                                                                                                                                                bit 
  5876.                                                                                                                                                                                                                                                                with 
  5877.                                                                                                                                                                                                                                                                ; 
  5878.                                                                                                                                                                                                                                                                can 
  5879.                                                                                                                                                                                                                                                                bits 
  5880.                                                                                                                                                                                                                                                                ios 
  5881.                                                                                                                                                                                                                                                                bit 
  5882.                                                                                                                                                                                                                                                                with 
  5883.                                                                                                                                                                                                                                                                clearing 
  5884.                                                                                                                                                                                                                                                                other 
  5885.                                                                                                                                                                                                                                                                leaves 
  5886.                                                                                                                                                                                                                                                                iosobj; 
  5887.                                                                                                                                                                                                                                                                void 
  5888.                                                                                                                                                                                                                                                                iosobj 
  5889.                                                                                                                                                                                                                                                                : 
  5890.                                                                                                                                                                                                                                                                |)example;OR 
  5891.                                                                                                                                                                                                                                                                without 
  5892.                                                                                                                                                                                                                                                                statement 
  5893.                                                                                                                                                                                                                                                                want .; 
  5894.  
  5895.                                                                                                                                                                                                                                                                bits 
  5896.                                                                                                                                                                                                                                                                to 
  5897.                                                                                                                                                                                                                                                                with,. 
  5898.                                                                                                                                                                                                                                                                int 
  5899.                                                                                                                                                                                                                                                                changes; 
  5900.                                                                                                                                                                                                                                                                ios 
  5901.                                                                                                                                                                                                                                                                bit 
  5902.                                                                                                                                                                                                                                                                with 
  5903.                                                                                                                                                                                                                                                                bits 
  5904.                                                                                                                                                                                                                                                                other 
  5905.                                                                                                                                                                                                                                                                sets 
  5906.                                                                                                                                                                                                                                                                of 
  5907.                                                                                                                                                                                                                                                                bits 
  5908.                                                                                                                                                                                                                                                                of 
  5909.                                                                                                                                                                                                                                                                ; 
  5910.                                                                                                                                                                                                                                                                its 
  5911.                                                                                                                                                                                                                                                                state 
  5912.                                                                                                                                                                                                                                                                |)example;without: 
  5913.                                                                                                                                                                                                                                                                bits 
  5914.                                                                                                                                                                                                                                                                its 
  5915.                                                                                                                                                                                                                                                                state 
  5916.                                                                                                                                                                                                                                                                rdstate)example;; 
  5917.                                                                                                                                                                                                                                                                void 
  5918.                                                                                                                                                                                                                                                                other 
  5919.                                                                                                                                                                                                                                                                following 
  5920.                                                                                                                                                                                                                                                                colon 
  5921.                                                                                                                                                                                                                                                                bit 
  5922.                                                                                                                                                                                                                                                                ( 
  5923.                                                                                                                                                                                                                                                                in 
  5924.                                                                                                                                                                                                                                                                with 
  5925.                                                                                                                                                                                                                                                                ; 
  5926.  
  5927.                                                                                                                                                                                                                                                                to 
  5928.                                                                                                                                                                                                                                                                ios 
  5929.                                                                                                                                                                                                                                                                bit 
  5930.                                                                                                                                                                                                                                                                with 
  5931.                                                                                                                                                                                                                                                                clearing 
  5932.                                                                                                                                                                                                                                                                other 
  5933.                                                                                                                                                                                                                                                                leaves 
  5934.                                                                                                                                                                                                                                                                iosobj; 
  5935.                                                                                                                                                                                                                                                                void 
  5936.                                                                                                                                                                                                                                                                iosobj 
  5937.                                                                                                                                                                                                                                                                : 
  5938.                                                                                                                                                                                                                                                                |)example;OR 
  5939.                                                                                                                                                                                                                                                                without 
  5940.                                                                                                                                                                                                                                                                statement 
  5941.                                                                                                                                                                                                                                                                wantint 
  5942.                                                                                                                                                                                                                                                                badbit 
  5943.                                                                                                                                                                                                                                                                bit 
  5944.                                                                                                                                                                                                                                                                clear 
  5945.                                                                                                                                                                                                                                                                rdstate 
  5946.                                                                                                                                                                                                                                                                are 
  5947.                                                                                                                                                                                                                                                                default 
  5948.                                                                                                                                                                                                                                                                unchanged 
  5949.                                                                                                                                                                                                                                                                error 
  5950.                                                                                                                                                                                                                                                                bits 
  5951.                                                                                                                                                                                                                                                                current 
  5952.                                                                                                                                                                                                                                                                cleared 
  5953.                                                                                                                                                                                                                                                                equals 
  5954.                                                                                                                                                                                                                                                                ; 
  5955.                                                                                                                                                                                                                                                                void 
  5956.                                                                                                                                                                                                                                                                of 
  5957.                                                                                                                                                                                                                                                                = 
  5958.                                                                                                                                                                                                                                                                of 
  5959.                                                                                                                                                                                                                                                                =: 
  5960.                                                                                                                                                                                                                                                                clear 
  5961.                                                                                                                                                                                                                                                                rdstate 
  5962.                                                                                                                                                                                                                                                                ; 
  5963.                                                                                                                                                                                                                                                                iosobj 
  5964.  
  5965.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               clear bits() are;
  5966.  
  5967.                                                                                                                                                                                                                                                                bits() 
  5968.                                                                                                                                                                                                                                                                error 
  5969.                                                                                                                                                                                                                                                                = 
  5970.                                                                                                                                                                                                                                                                current 
  5971.                                                                                                                                                                                                                                                                badbit 
  5972.                                                                                                                                                                                                                                                                cleared::and.::and.and.::and.::and.and.all 
  5973.                                                                                                                                                                                                                                                                default cleared::and.::and.and.::and.::bit(
  5974.  
  5975.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ifstream();
  5976.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ifstream(int d);
  5977.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ifstream(const char* fname,
  5978.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        int mode=ios&c2.in,
  5979.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        int prot=filebuf&c2.openprot);
  5980.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ifstream(int d, char* p, int len);
  5981.  
  5982.                                                                                                                                                                                                                                                                There 
  5983.                                                                                                                                                                                                                                                                are 
  5984.                                                                                                                                                                                                                                                                four 
  5985.                                                                                                                                                                                                                                                                versions 
  5986.                                                                                                                                                                                                                                                                of 
  5987.                                                                                                                                                                                                                                                                the 
  5988.                                                                                                                                                                                                                                                                ifstream 
  5989.                                                                                                                                                                                                                                                                constructor. 
  5990.                                                                                                                                                                                                                                                                The 
  5991.                                                                                                                                                                                                                                                                first 
  5992.                                                                                                                                                                                                                                                                version 
  5993.                                                                                                                                                                                                                                                                takes 
  5994.                                                                                                                                                                                                                                                                no 
  5995.                                                                                                                                                                                                                                                                arguments 
  5996.                                                                                                                                                                                                                                                                and 
  5997.                                                                                                                                                                                                                                                                constructs 
  5998.                                                                                                                                                                                                                                                                an 
  5999.                                                                                                                                                                                                                                                                unopened 
  6000.                                                                                                                                                                                                                                                                ifstream 
  6001.                                                                                                                                                                                                                                                                object. 
  6002.                                                                                                                                                                                                                                                                The 
  6003.                                                                                                                                                                                                                                                                second 
  6004.                                                                                                                                                                                                                                                                version 
  6005.                                                                                                                                                                                                                                                                takes 
  6006.                                                                                                                                                                                                                                                                one 
  6007.                                                                                                                                                                                                                                                                argument 
  6008.                                                                                                                                                                                                                                                                and 
  6009.                                                                                                                                                                                                                                                                constructs 
  6010.                                                                                                                                                                                                                                                                an 
  6011.                                                                                                                                                                                                                                                                ifstream 
  6012.                                                                                                                                                                                                                                                                object 
  6013.                                                                                                                                                                                                                                                                that 
  6014.                                                                                                                                                                                                                                                                is 
  6015.                                                                                                                                                                                                                                                                attached 
  6016.                                                                                                                                                                                                                                                                to 
  6017.                                                                                                                                                                                                                                                                the 
  6018.                                                                                                                                                                                                                                                                file 
  6019.                                                                                                                                                                                                                                                                descriptor 
  6020.                                                                                                                                                                                                                                                                d. 
  6021.                                                                                                                                                                                                                                                                If 
  6022.                                                                                                                                                                                                                                                                d 
  6023.                                                                                                                                                                                                                                                                is 
  6024.                                                                                                                                                                                                                                                                not 
  6025.                                                                                                                                                                                                                                                                open, 
  6026.                                                                                                                                                                                                                                                                ios&c2.failbit 
  6027.                                                                                                                                                                                                                                                                is 
  6028.                                                                                                                                                                                                                                                                set 
  6029.                                                                                                                                                                                                                                                                in 
  6030.                                                                                                                                                                                                                                                                the 
  6031.                                                                                                                                                                                                                                                                format 
  6032.                                                                                                                                                                                                                                                                state 
  6033.                                                                                                                                                                                                                                                                of 
  6034.                                                                                                                                                                                                                                                                ifs. 
  6035.  
  6036.                                                                                                                                                                                                                                                                The 
  6037.                                                                                                                                                                                                                                                                third 
  6038.                                                                                                                                                                                                                                                                and 
  6039.                                                                                                                                                                                                                                                                fourth 
  6040.                                                                                                                                                                                                                                                                versions 
  6041.                                                                                                                                                                                                                                                                of 
  6042.                                                                                                                                                                                                                                                                the 
  6043.                                                                                                                                                                                                                                                                ifstream() 
  6044.                                                                                                                                                                                                                                                                constructor 
  6045.                                                                                                                                                                                                                                                                take 
  6046.                                                                                                                                                                                                                                                                three 
  6047.                                                                                                                                                                                                                                                                arguments. 
  6048.                                                                                                                                                                                                                                                                The 
  6049.                                                                                                                                                                                                                                                                third 
  6050.                                                                                                                                                                                                                                                                version 
  6051.                                                                                                                                                                                                                                                                constructs 
  6052.                                                                                                                                                                                                                                                                an 
  6053.                                                                                                                                                                                                                                                                ifstream 
  6054.                                                                                                                                                                                                                                                                object 
  6055.                                                                                                                                                                                                                                                                and 
  6056.                                                                                                                                                                                                                                                                opens 
  6057.                                                                                                                                                                                                                                                                the 
  6058.                                                                                                                                                                                                                                                                file 
  6059.                                                                                                                                                                                                                                                                fname 
  6060.                                                                                                                                                                                                                                                                with 
  6061.                                                                                                                                                                                                                                                                open 
  6062.                                                                                                                                                                                                                                                                mode 
  6063.                                                                                                                                                                                                                                                                equal 
  6064.                                                                                                                                                                                                                                                                to 
  6065.                                                                                                                                                                                                                                                                mode 
  6066.                                                                                                                                                                                                                                                                and 
  6067.                                                                                                                                                                                                                                                                protection 
  6068.                                                                                                                                                                                                                                                                mode 
  6069.                                                                                                                                                                                                                                                                equal 
  6070.                                                                                                                                                                                                                                                                to 
  6071.                                                                                                                                                                                                                                                                prot. 
  6072.                                                                                                                                                                                                                                                                The 
  6073.                                                                                                                                                                                                                                                                default 
  6074.                                                                                                                                                                                                                                                                value 
  6075.                                                                                                                                                                                                                                                                for 
  6076.                                                                                                                                                                                                                                                                mode 
  6077.                                                                                                                                                                                                                                                                is 
  6078.                                                                                                                                                                                                                                                                ios&c2.in, 
  6079.                                                                                                                                                                                                                                                                and 
  6080.                                                                                                                                                                                                                                                                the 
  6081.                                                                                                                                                                                                                                                                default 
  6082.                                                                                                                                                                                                                                                                value 
  6083.                                                                                                                                                                                                                                                                for 
  6084.                                                                                                                                                                                                                                                                prot 
  6085.                                                                                                                                                                                                                                                                is 
  6086.                                                                                                                                                                                                                                                                filebuf&c2.openprot. 
  6087.                                                                                                                                                                                                                                                                If 
  6088.                                                                                                                                                                                                                                                                the 
  6089.                                                                                                                                                                                                                                                                file 
  6090.                                                                                                                                                                                                                                                                cannot 
  6091.                                                                                                                                                                                                                                                                be 
  6092.                                                                                                                                                                                                                                                                opened, 
  6093.                                                                                                                                                                                                                                                                the 
  6094.                                                                                                                                                                                                                                                                error 
  6095.                                                                                                                                                                                                                                                                state 
  6096.                                                                                                                                                                                                                                                                of 
  6097.                                                                                                                                                                                                                                                                the 
  6098.                                                                                                                                                                                                                                                                constructed 
  6099.                                                                                                                                                                                                                                                                ifstream 
  6100.                                                                                                                                                                                                                                                                object 
  6101.                                                                                                                                                                                                                                                                is 
  6102.                                                                                                                                                                                                                                                                set. 
  6103.  
  6104.                                                                                                                                                                                                                                                                The 
  6105.                                                                                                                                                                                                                                                                fourth 
  6106.                                                                                                                                                                                                                                                                version 
  6107.                                                                                                                                                                                                                                                                constructs 
  6108.                                                                                                                                                                                                                                                                an 
  6109.                                                                                                                                                                                                                                                                ifstream 
  6110.                                                                                                                                                                                                                                                                object 
  6111.                                                                                                                                                                                                                                                                that 
  6112.                                                                                                                                                                                                                                                                is 
  6113.                                                                                                                                                                                                                                                                attached 
  6114.                                                                                                                                                                                                                                                                to 
  6115.                                                                                                                                                                                                                                                                the 
  6116.                                                                                                                                                                                                                                                                file 
  6117.                                                                                                                                                                                                                                                                descriptor 
  6118.                                                                                                                                                                                                                                                                d. 
  6119.                                                                                                                                                                                                                                                                If 
  6120.                                                                                                                                                                                                                                                                d 
  6121.                                                                                                                                                                                                                                                                is 
  6122.                                                                                                                                                                                                                                                                not 
  6123.                                                                                                                                                                                                                                                                open, 
  6124.                                                                                                                                                                                                                                                                ios&c2.failbit 
  6125.                                                                                                                                                                                                                                                                is 
  6126.                                                                                                                                                                                                                                                                set 
  6127.                                                                                                                                                                                                                                                                in 
  6128.                                                                                                                                                                                                                                                                the 
  6129.                                                                                                                                                                                                                                                                format 
  6130.                                                                                                                                                                                                                                                                state 
  6131.                                                                                                                                                                                                                                                                of 
  6132.                                                                                                                                                                                                                                                                ifs. 
  6133.                                                                                                                                                                                                                                                                This 
  6134.                                                                                                                                                                                                                                                                constructor 
  6135.                                                                                                                                                                                                                                                                also 
  6136.                                                                                                                                                                                                                                                                sets 
  6137.                                                                                                                                                                                                                                                                up 
  6138.                                                                                                                                                                                                                                                                an 
  6139.                                                                                                                                                                                                                                                                associated 
  6140.                                                                                                                                                                                                                                                                filebuf 
  6141.                                                                                                                                                                                                                                                                object 
  6142.                                                                                                                                                                                                                                                                with 
  6143.                                                                                                                                                                                                                                                                a 
  6144.                                                                                                                                                                                                                                                                stream 
  6145.                                                                                                                                                                                                                                                                buffer 
  6146.                                                                                                                                                                                                                                                                that 
  6147.                                                                                                                                                                                                                                                                has 
  6148.                                                                                                                                                                                                                                                                length 
  6149.                                                                                                                                                                                                                                                                len 
  6150.                                                                                                                                                                                                                                                                bytes 
  6151.                                                                                                                                                                                                                                                                and 
  6152.                                                                                                                                                                                                                                                                begins 
  6153.                                                                                                                                                                                                                                                                at 
  6154.                                                                                                                                                                                                                                                                the 
  6155.                                                                                                                                                                                                                                                                position 
  6156.                                                                                                                                                                                                                                                                pointed 
  6157.                                                                                                                                                                                                                                                                to 
  6158.                                                                                                                                                                                                                                                                by 
  6159.                                                                                                                                                                                                                                                                p. 
  6160.                                                                                                                                                                                                                                                                If 
  6161.                                                                                                                                                                                                                                                                p 
  6162.                                                                                                                                                                                                                                                                is 
  6163.                                                                                                                                                                                                                                                                equal 
  6164.                                                                                                                                                                                                                                                                to 
  6165.                                                                                                                                                                                                                                                                0 
  6166.                                                                                                                                                                                                                                                                or 
  6167.                                                                                                                                                                                                                                                                len 
  6168.                                                                                                                                                                                                                                                                is 
  6169.                                                                                                                                                                                                                                                                equal 
  6170.                                                                                                                                                                                                                                                                to 
  6171.                                                                                                                                                                                                                                                                0, 
  6172.                                                                                                                                                                                                                                                                the 
  6173.                                                                                                                                                                                                                                                                associated 
  6174.                                                                                                                                                                                                                                                                filebuf 
  6175.                                                                                                                                                                                                                                                                object 
  6176.                                                                                                                                                                                                                                                                is 
  6177.                                                                                                                                                                                                                                                                unbuffered. 
  6178.  
  6179.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               int eof() const;
  6180.  
  6181.                                                                                                                                                                                                                                                                eof() 
  6182.                                                                                                                                                                                                                                                                returns 
  6183.                                                                                                                                                                                                                                                                a 
  6184.                                                                                                                                                                                                                                                                nonzero 
  6185.                                                                                                                                                                                                                                                                value 
  6186.                                                                                                                                                                                                                                                                if 
  6187.                                                                                                                                                                                                                                                                ios::colon.::colon.colon.::colon.::colon.colon.eofbit 
  6188.                                                                                                                                                                                                                                                                is 
  6189.                                                                                                                                                                                                                                                                set 
  6190.                                                                                                                                                                                                                                                                in 
  6191.                                                                                                                                                                                                                                                                the 
  6192.                                                                                                                                                                                                                                                                error 
  6193.                                                                                                                                                                                                                                                                state 
  6194.                                                                                                                                                                                                                                                                of 
  6195.                                                                                                                                                                                                                                                                iosobj. 
  6196.                                                                                                                                                                                                                                                                Otherwise, 
  6197.                                                                                                                                                                                                                                                                it 
  6198.                                                                                                                                                                                                                                                                returns 
  6199.                                                                                                                                                                                                                                                                0. 
  6200.                                                                                                                                                                                                                                                                ios::colon.::colon.colon.::colon.::colon.colon.eofbit 
  6201.                                                                                                                                                                                                                                                                is 
  6202.                                                                                                                                                                                                                                                                usually 
  6203.                                                                                                                                                                                                                                                                set 
  6204.                                                                                                                                                                                                                                                                when 
  6205.                                                                                                                                                                                                                                                                an 
  6206.                                                                                                                                                                                                                                                                EOF 
  6207.                                                                                                                                                                                                                                                                has 
  6208.                                                                                                                                                                                                                                                                been 
  6209.                                                                                                                                                                                                                                                                encountered 
  6210.                                                                                                                                                                                                                                                                during 
  6211.                                                                                                                                                                                                                                                                an 
  6212.                                                                                                                                                                                                                                                                extraction 
  6213.                                                                                                                                                                                                                                                                operation. 
  6214.                                                                                                                                                                                                                                                                ;EOFencounteredreturnsduringhastheset 
  6215.                                                                                                                                                                                                                                                                ;set:) 
  6216.                                                                                                                                                                                                                                                                is 
  6217.                                                                                                                                                                                                                                                                ; when;
  6218.  
  6219.                                                                                                                                                                                                                                                                encountered 
  6220.                                                                                                                                                                                                                                                                ) 
  6221.  
  6222.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ,.an
  6223.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               , set.an
  6224.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               during(of nonzero0 :
  6225.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ( been)is;: been)is;.an
  6226.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               , set: nonzero0 :  .an
  6227.  
  6228.                                                                                                                                                                                                                                                                eof 
  6229.                                                                                                                                                                                                                                                                Otherwise; 
  6230.                                                                                                                                                                                                                                                                eofbit 
  6231.                                                                                                                                                                                                                                                                encountered 
  6232.                                                                                                                                                                                                                                                                returns 
  6233.                                                                                                                                                                                                                                                                during 
  6234.                                                                                                                                                                                                                                                                ; 
  6235.                                                                                                                                                                                                                                                                EOF 
  6236.                                                                                                                                                                                                                                                                encountered 
  6237.                                                                                                                                                                                                                                                                returns 
  6238.                                                                                                                                                                                                                                                                during 
  6239.                                                                                                                                                                                                                                                                has 
  6240.                                                                                                                                                                                                                                                                the 
  6241.                                                                                                                                                                                                                                                                set; 
  6242.                                                                                                                                                                                                                                                                set 
  6243.                                                                                                                                                                                                                                                                : 
  6244.                                                                                                                                                                                                                                                                )is;when 
  6245.                                                                                                                                                                                                                                                                ; 
  6246.  
  6247.                                                                                                                                                                                                                                                                encountered 
  6248.                                                                                                                                                                                                                                                                ,. 
  6249.                                                                                                                                                                                                                                                                Otherwise 
  6250.                                                                                                                                                                                                                                                                eofbit; 
  6251.                                                                                                                                                                                                                                                                returns 
  6252.                                                                                                                                                                                                                                                                during 
  6253.                                                                                                                                                                                                                                                                encountered 
  6254.                                                                                                                                                                                                                                                                usually 
  6255.                                                                                                                                                                                                                                                                during 
  6256.                                                                                                                                                                                                                                                                ( 
  6257.                                                                                                                                                                                                                                                                . 
  6258.                                                                                                                                                                                                                                                                encountered 
  6259.                                                                                                                                                                                                                                                                usually 
  6260.                                                                                                                                                                                                                                                                ; 
  6261.                                                                                                                                                                                                                                                                state 
  6262.                                                                                                                                                                                                                                                                )is;: 
  6263.                                                                                                                                                                                                                                                                encountered 
  6264.                                                                                                                                                                                                                                                                state 
  6265.                                                                                                                                                                                                                                                                )is;iosobj  ;itif:valueoperation;
  6266.  
  6267.                                                                                                                                                                                                                                                                returns 
  6268.                                                                                                                                                                                                                                                                during 
  6269.                                                                                                                                                                                                                                                                has 
  6270.                                                                                                                                                                                                                                                                the 
  6271.                                                                                                                                                                                                                                                                set; 
  6272.                                                                                                                                                                                                                                                                set 
  6273.                                                                                                                                                                                                                                                                : 
  6274.                                                                                                                                                                                                                                                                )is;when 
  6275.                                                                                                                                                                                                                                                                ; 
  6276.                                                                                                                                                                                                                                                                Otherwise 
  6277.                                                                                                                                                                                                                                                                const 
  6278.                                                                                                                                                                                                                                                                during 
  6279.                                                                                                                                                                                                                                                                error 
  6280.                                                                                                                                                                                                                                                                colon 
  6281.                                                                                                                                                                                                                                                                int 
  6282.                                                                                                                                                                                                                                                                iosobj 
  6283.                                                                                                                                                                                                                                                                encountered 
  6284.                                                                                                                                                                                                                                                                in 
  6285.                                                                                                                                                                                                                                                                extraction 
  6286.                                                                                                                                                                                                                                                                ios 
  6287.                                                                                                                                                                                                                                                                ; 
  6288.                                                                                                                                                                                                                                                                usually 
  6289.                                                                                                                                                                                                                                                                a 
  6290.                                                                                                                                                                                                                                                                usually 
  6291.                                                                                                                                                                                                                                                                a: 
  6292.                                                                                                                                                                                                                                                                error 
  6293.                                                                                                                                                                                                                                                                ; 
  6294.                                                                                                                                                                                                                                                                during 
  6295.                                                                                                                                                                                                                                                                ( 
  6296.                                                                                                                                                                                                                                                                during 
  6297.                                                                                                                                                                                                                                                                ( 
  6298.                                                                                                                                                                                                                                                                colon 
  6299.                                                                                                                                                                                                                                                                error 
  6300.                                                                                                                                                                                                                                                                ( 
  6301.                                                                                                                                                                                                                                                                Otherwise 
  6302.                                                                                                                                                                                                                                                                a 
  6303.                                                                                                                                                                                                                                                                0 
  6304.                                                                                                                                                                                                                                                                ) 
  6305.                                                                                                                                                                                                                                                                ; 
  6306.  
  6307.                                                                                                                                                                                                                                                                error() 
  6308.                                                                                                                                                                                                                                                                eofbit 
  6309.                                                                                                                                                                                                                                                                iosobj 
  6310.                                                                                                                                                                                                                                                                usually 
  6311.                                                                                                                                                                                                                                                                set 
  6312.                                                                                                                                                                                                                                                                . 
  6313.                                                                                                                                                                                                                                                                of 
  6314.                                                                                                                                                                                                                                                                ios 
  6315.                                                                                                                                                                                                                                                                0 
  6316.                                                                                                                                                                                                                                                                (state 
  6317.                                                                                                                                                                                                                                                                int), 
  6318.                                                                                                                                                                                                                                                                an 
  6319.                                                                                                                                                                                                                                                                usually 
  6320.                                                                                                                                                                                                                                                                encountered 
  6321.                                                                                                                                                                                                                                                                operation 
  6322.                                                                                                                                                                                                                                                                iosobj 
  6323.                                                                                                                                                                                                                                                                colon 
  6324.                                                                                                                                                                                                                                                                extraction. 
  6325.                                                                                                                                                                                                                                                                of 
  6326.                                                                                                                                                                                                                                                                value 
  6327.                                                                                                                                                                                                                                                                usually 
  6328.                                                                                                                                                                                                                                                                encountered 
  6329.                                                                                                                                                                                                                                                                has 
  6330.                                                                                                                                                                                                                                                                iosobj 
  6331.                                                                                                                                                                                                                                                                , 
  6332.                                                                                                                                                                                                                                                                EOF 
  6333.                                                                                                                                                                                                                                                                eof 
  6334.                                                                                                                                                                                                                                                                when 
  6335.                                                                                                                                                                                                                                                                during 
  6336.                                                                                                                                                                                                                                                                in 
  6337.                                                                                                                                                                                                                                                                iosobj 
  6338.                                                                                                                                                                                                                                                                . 
  6339.                                                                                                                                                                                                                                                                nonzero 
  6340.                                                                                                                                                                                                                                                                is, 
  6341.                                                                                                                                                                                                                                                                it 
  6342.                                                                                                                                                                                                                                                                returns::if.::if.if.::if.::if.if.const 
  6343.                                                                                                                                                                                                                                                                operation 
  6344.                                                                                                                                                                                                                                                                set 
  6345.                                                                                                                                                                                                                                                                been 
  6346.                                                                                                                                                                                                                                                                the 
  6347.                                                                                                                                                                                                                                                                an 
  6348.                                                                                                                                                                                                                                                                iosobj 
  6349.                                                                                                                                                                                                                                                                encountered 
  6350.                                                                                                                                                                                                                                                                : 
  6351.  
  6352.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               set.error(returns::if.::if.if.::if.::if.if.constset.());
  6353.                                                                                                                                                                                                                                                                during 
  6354.                                                                                                                                                                                                                                                                ( 
  6355.                                                                                                                                                                                                                                                                ( 
  6356.                                                                                                                                                                                                                                                                : 
  6357.                                                                                                                                                                                                                                                                ,. 
  6358.  
  6359.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ,.an
  6360.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               , set.an
  6361.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ,of nonzero0 :
  6362.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ( been)is;:
  6363.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ( been)is;.an
  6364.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               , set: nonzero0 :  during(during(.an
  6365.  
  6366.                                                                                                                                                                                                                                                                eof 
  6367.                                                                                                                                                                                                                                                                Otherwise; 
  6368.                                                                                                                                                                                                                                                                eofbit 
  6369.                                                                                                                                                                                                                                                                encountered 
  6370.                                                                                                                                                                                                                                                                returns 
  6371.                                                                                                                                                                                                                                                                during 
  6372.                                                                                                                                                                                                                                                                ;EOFencounteredreturnsduringhastheset 
  6373.                                                                                                                                                                                                                                                                ;set:) 
  6374.                                                                                                                                                                                                                                                                is 
  6375.                                                                                                                                                                                                                                                                ; 
  6376.                                                                                                                                                                                                                                                                when.  ;
  6377.  
  6378.                                                                                                                                                                                                                                                                encountered 
  6379.                                                                                                                                                                                                                                                                ,. 
  6380.                                                                                                                                                                                                                                                                Otherwise 
  6381.                                                                                                                                                                                                                                                                eofbit; 
  6382.                                                                                                                                                                                                                                                                returns 
  6383.                                                                                                                                                                                                                                                                during 
  6384.                                                                                                                                                                                                                                                                encountered 
  6385.                                                                                                                                                                                                                                                                usually 
  6386.                                                                                                                                                                                                                                                                encountered 
  6387.                                                                                                                                                                                                                                                                usually 
  6388.                                                                                                                                                                                                                                                                ;state) 
  6389.                                                                                                                                                                                                                                                                is 
  6390.                                                                                                                                                                                                                                                                ; 
  6391.                                                                                                                                                                                                                                                                :encounteredstate) 
  6392.                                                                                                                                                                                                                                                                is 
  6393.                                                                                                                                                                                                                                                                ; ;itifduring(during(operation;
  6394.  
  6395.                                                                                                                                                                                                                                                                returns 
  6396.                                                                                                                                                                                                                                                                during 
  6397.                                                                                                                                                                                                                                                                has 
  6398.                                                                                                                                                                                                                                                                the 
  6399.                                                                                                                                                                                                                                                                set; 
  6400.                                                                                                                                                                                                                                                                set 
  6401.                                                                                                                                                                                                                                                                : 
  6402.                                                                                                                                                                                                                                                                )is;when 
  6403.                                                                                                                                                                                                                                                                Otherwise 
  6404.                                                                                                                                                                                                                                                                const 
  6405.                                                                                                                                                                                                                                                                during 
  6406.                                                                                                                                                                                                                                                                error 
  6407.                                                                                                                                                                                                                                                                colon 
  6408.                                                                                                                                                                                                                                                                int 
  6409.                                                                                                                                                                                                                                                                iosobj 
  6410.                                                                                                                                                                                                                                                                encountered 
  6411.                                                                                                                                                                                                                                                                in 
  6412.                                                                                                                                                                                                                                                                extraction 
  6413.                                                                                                                                                                                                                                                                ios 
  6414.                                                                                                                                                                                                                                                                ; 
  6415.                                                                                                                                                                                                                                                                usually 
  6416.                                                                                                                                                                                                                                                                a 
  6417.                                                                                                                                                                                                                                                                usually 
  6418.                                                                                                                                                                                                                                                                a: 
  6419.                                                                                                                                                                                                                                                                error 
  6420.                                                                                                                                                                                                                                                                ; 
  6421.                                                                                                                                                                                                                                                                set 
  6422.  
  6423.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               error encountered() colon;
  6424.  
  6425.                                                                                                                                                                                                                                                                encountered() 
  6426.                                                                                                                                                                                                                                                                iosobj 
  6427.                                                                                                                                                                                                                                                                a 
  6428.                                                                                                                                                                                                                                                                in 
  6429.                                                                                                                                                                                                                                                                const 
  6430.                                                                                                                                                                                                                                                                extraction::been.::been.: 
  6431.                                                                                                                                                                                                                                                                been 
  6432.                                                                                                                                                                                                                                                                . 
  6433.                                                                                                                                                                                                                                                                : 
  6434.                                                                                                                                                                                                                                                                : 
  6435.                                                                                                                                                                                                                                                                been 
  6436.                                                                                                                                                                                                                                                                . 
  6437.                                                                                                                                                                                                                                                                been 
  6438.                                                                                                                                                                                                                                                                . 
  6439.                                                                                                                                                                                                                                                                anintextraction 
  6440.                                                                                                                                                                                                                                                                : 
  6441.                                                                                                                                                                                                                                                                : 
  6442.                                                                                                                                                                                                                                                                been 
  6443.                                                                                                                                                                                                                                                                . 
  6444.                                                                                                                                                                                                                                                                : 
  6445.                                                                                                                                                                                                                                                                : 
  6446.                                                                                                                                                                                                                                                                been 
  6447.                                                                                                                                                                                                                                                                . 
  6448.                                                                                                                                                                                                                                                                been 
  6449.                                                                                                                                                                                                                                                                . 
  6450.                                                                                                                                                                                                                                                                : 
  6451.                                                                                                                                                                                                                                                                : 
  6452.                                                                                                                                                                                                                                                                been 
  6453.                                                                                                                                                                                                                                                                . 
  6454.                                                                                                                                                                                                                                                                : 
  6455.                                                                                                                                                                                                                                                                : 
  6456.                                                                                                                                                                                                                                                                during 
  6457.                                                                                                                                                                                                                                                                ( 
  6458.                                                                                                                                                                                                                                                                ) 
  6459.  
  6460.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ,.an
  6461.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               , set.an
  6462.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ,of nonzero0 :
  6463.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ( been)is;:
  6464.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ( been)is;.an
  6465.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               , set: nonzero0  .an
  6466.  
  6467.                                                                                                                                                                                                                                                                eof 
  6468.                                                                                                                                                                                                                                                                Otherwise; 
  6469.                                                                                                                                                                                                                                                                eofbit 
  6470.                                                                                                                                                                                                                                                                encountered 
  6471.                                                                                                                                                                                                                                                                returns 
  6472.                                                                                                                                                                                                                                                                during 
  6473.                                                                                                                                                                                                                                                                ; 
  6474.                                                                                                                                                                                                                                                                EOF 
  6475.                                                                                                                                                                                                                                                                encountered 
  6476.                                                                                                                                                                                                                                                                returns 
  6477.                                                                                                                                                                                                                                                                during 
  6478.                                                                                                                                                                                                                                                                has 
  6479.                                                                                                                                                                                                                                                                the 
  6480.                                                                                                                                                                                                                                                                set; 
  6481.                                                                                                                                                                                                                                                                set 
  6482.                                                                                                                                                                                                                                                                : 
  6483.                                                                                                                                                                                                                                                                )is;when 
  6484.                                                                                                                                                                                                                                                                ; 
  6485.  
  6486.                                                                                                                                                                                                                                                                encountered 
  6487.                                                                                                                                                                                                                                                                ,. 
  6488.                                                                                                                                                                                                                                                                Otherwise 
  6489.                                                                                                                                                                                                                                                                eofbitreturns 
  6490.                                                                                                                                                                                                                                                                during 
  6491.                                                                                                                                                                                                                                                                encountered 
  6492.                                                                                                                                                                                                                                                                usually 
  6493.                                                                                                                                                                                                                                                                encountered 
  6494.                                                                                                                                                                                                                                                                usually 
  6495.                                                                                                                                                                                                                                                                ; 
  6496.                                                                                                                                                                                                                                                                state 
  6497.                                                                                                                                                                                                                                                                )is;: 
  6498.                                                                                                                                                                                                                                                                encountered 
  6499.                                                                                                                                                                                                                                                                state 
  6500.                                                                                                                                                                                                                                                                )is;; 
  6501.                                                                                                                                                                                                                                                                it 
  6502.                                                                                                                                                                                                                                                                if 
  6503.                                                                                                                                                                                                                                                                : 
  6504.                                                                                                                                                                                                                                                                value 
  6505.                                                                                                                                                                                                                                                                operation 
  6506.                                                                                                                                                                                                                                                                ; 
  6507.  
  6508.                                                                                                                                                                                                                                                                returns 
  6509.                                                                                                                                                                                                                                                                during 
  6510.                                                                                                                                                                                                                                                                has 
  6511.                                                                                                                                                                                                                                                                the 
  6512.                                                                                                                                                                                                                                                                , 
  6513.                                                                                                                                                                                                                                                                . 
  6514.                                                                                                                                                                                                                                                                ;set:) 
  6515.                                                                                                                                                                                                                                                                is 
  6516.                                                                                                                                                                                                                                                                ; 
  6517.                                                                                                                                                                                                                                                                when;Otherwiseconstduringerrorcolonintiosobjencounteredinextractionios;usuallyausuallya :error; 0
  6518.  
  6519.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               int eof() const;
  6520.  
  6521.                                                                                                                                                                                                                                                                eof() 
  6522.                                                                                                                                                                                                                                                                returns 
  6523.                                                                                                                                                                                                                                                                a 
  6524.                                                                                                                                                                                                                                                                nonzero 
  6525.                                                                                                                                                                                                                                                                value 
  6526.                                                                                                                                                                                                                                                                if 
  6527.                                                                                                                                                                                                                                                                ios::colon.::colon.colon.::colon.::colon.colon.eofbit 
  6528.                                                                                                                                                                                                                                                                is 
  6529.                                                                                                                                                                                                                                                                set 
  6530.                                                                                                                                                                                                                                                                in 
  6531.                                                                                                                                                                                                                                                                the 
  6532.                                                                                                                                                                                                                                                                error 
  6533.                                                                                                                                                                                                                                                                state 
  6534.                                                                                                                                                                                                                                                                of 
  6535.                                                                                                                                                                                                                                                                iosobj. 
  6536.                                                                                                                                                                                                                                                                Otherwise, 
  6537.                                                                                                                                                                                                                                                                it 
  6538.                                                                                                                                                                                                                                                                returns 
  6539.                                                                                                                                                                                                                                                                0. 
  6540.                                                                                                                                                                                                                                                                ios::colon.::colon.colon.::colon.::colon.colon.eofbit 
  6541.                                                                                                                                                                                                                                                                is 
  6542.                                                                                                                                                                                                                                                                usually 
  6543.                                                                                                                                                                                                                                                                set 
  6544.                                                                                                                                                                                                                                                                when 
  6545.                                                                                                                                                                                                                                                                an 
  6546.                                                                                                                                                                                                                                                                EOF 
  6547.                                                                                                                                                                                                                                                                has 
  6548.                                                                                                                                                                                                                                                                been 
  6549.                                                                                                                                                                                                                                                                encountered 
  6550.                                                                                                                                                                                                                                                                during 
  6551.                                                                                                                                                                                                                                                                an 
  6552.                                                                                                                                                                                                                                                                extraction 
  6553.                                                                                                                                                                                                                                                                operation. 
  6554.                                                                                                                                                                                                                                                                ;EOFencounteredreturnsduringhastheset 
  6555.                                                                                                                                                                                                                                                                ;set:) 
  6556.                                                                                                                                                                                                                                                                is 
  6557.                                                                                                                                                                                                                                                                ; when;
  6558.  
  6559.                                                                                                                                                                                                                                                                encountered 
  6560.                                                                                                                                                                                                                                                                ) 
  6561.  
  6562.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ,.an
  6563.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               , set.an
  6564.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               during(of nonzero0 :
  6565.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ( been)is;: been)is;.an
  6566.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               , set: nonzero0 :  .an
  6567.  
  6568.                                                                                                                                                                                                                                                                eof 
  6569.                                                                                                                                                                                                                                                                Otherwise; 
  6570.                                                                                                                                                                                                                                                                eofbit 
  6571.                                                                                                                                                                                                                                                                encountered 
  6572.                                                                                                                                                                                                                                                                returns 
  6573.                                                                                                                                                                                                                                                                during 
  6574.                                                                                                                                                                                                                                                                ; 
  6575.                                                                                                                                                                                                                                                                EOF 
  6576.                                                                                                                                                                                                                                                                encountered 
  6577.                                                                                                                                                                                                                                                                returns 
  6578.                                                                                                                                                                                                                                                                during 
  6579.                                                                                                                                                                                                                                                                has 
  6580.                                                                                                                                                                                                                                                                the 
  6581.                                                                                                                                                                                                                                                                set; 
  6582.                                                                                                                                                                                                                                                                set 
  6583.                                                                                                                                                                                                                                                                : 
  6584.                                                                                                                                                                                                                                                                )is;when 
  6585.                                                                                                                                                                                                                                                                ; 
  6586.  
  6587.                                                                                                                                                                                                                                                                encountered 
  6588.                                                                                                                                                                                                                                                                ,. 
  6589.                                                                                                                                                                                                                                                                Otherwise 
  6590.                                                                                                                                                                                                                                                                eofbit; 
  6591.                                                                                                                                                                                                                                                                returns 
  6592.                                                                                                                                                                                                                                                                during 
  6593.                                                                                                                                                                                                                                                                encountered 
  6594.                                                                                                                                                                                                                                                                usually 
  6595.                                                                                                                                                                                                                                                                during 
  6596.                                                                                                                                                                                                                                                                ( 
  6597.                                                                                                                                                                                                                                                                . 
  6598.                                                                                                                                                                                                                                                                encountered 
  6599.                                                                                                                                                                                                                                                                usually 
  6600.                                                                                                                                                                                                                                                                ; 
  6601.                                                                                                                                                                                                                                                                state 
  6602.                                                                                                                                                                                                                                                                )is;: 
  6603.                                                                                                                                                                                                                                                                encountered 
  6604.                                                                                                                                                                                                                                                                state 
  6605.                                                                                                                                                                                                                                                                )is;iosobj  ;itif:valueoperation;
  6606.  
  6607.                                                                                                                                                                                                                                                                returns 
  6608.                                                                                                                                                                                                                                                                during 
  6609.                                                                                                                                                                                                                                                                has 
  6610.                                                                                                                                                                                                                                                                the 
  6611.                                                                                                                                                                                                                                                                set; 
  6612.                                                                                                                                                                                                                                                                set 
  6613.                                                                                                                                                                                                                                                                : 
  6614.                                                                                                                                                                                                                                                                )is;when 
  6615.                                                                                                                                                                                                                                                                ; 
  6616.                                                                                                                                                                                                                                                                Otherwise 
  6617.                                                                                                                                                                                                                                                                const 
  6618.                                                                                                                                                                                                                                                                during 
  6619.                                                                                                                                                                                                                                                                error 
  6620.                                                                                                                                                                                                                                                                colon 
  6621.                                                                                                                                                                                                                                                                int 
  6622.                                                                                                                                                                                                                                                                iosobj 
  6623.                                                                                                                                                                                                                                                                encountered 
  6624.                                                                                                                                                                                                                                                                in 
  6625.                                                                                                                                                                                                                                                                extraction 
  6626.                                                                                                                                                                                                                                                                ios 
  6627.                                                                                                                                                                                                                                                                ; 
  6628.                                                                                                                                                                                                                                                                usually 
  6629.                                                                                                                                                                                                                                                                a 
  6630.                                                                                                                                                                                                                                                                usually 
  6631.                                                                                                                                                                                                                                                                a: 
  6632.                                                                                                                                                                                                                                                                error 
  6633.                                                                                                                                                                                                                                                                ; 
  6634.                                                                                                                                                                                                                                                                during 
  6635.                                                                                                                                                                                                                                                                ( 
  6636.                                                                                                                                                                                                                                                                during 
  6637.                                                                                                                                                                                                                                                                ( 
  6638.                                                                                                                                                                                                                                                                colon 
  6639.                                                                                                                                                                                                                                                                error 
  6640.                                                                                                                                                                                                                                                                ( 
  6641.                                                                                                                                                                                                                                                                Otherwise 
  6642.                                                                                                                                                                                                                                                                a 
  6643.                                                                                                                                                                                                                                                                0 
  6644.                                                                                                                                                                                                                                                                ) 
  6645.                                                                                                                                                                                                                                                                ; 
  6646.  
  6647.                                                                                                                                                                                                                                                                error() 
  6648.                                                                                                                                                                                                                                                                eofbit 
  6649.                                                                                                                                                                                                                                                                iosobj 
  6650.                                                                                                                                                                                                                                                                usually 
  6651.                                                                                                                                                                                                                                                                set 
  6652.                                                                                                                                                                                                                                                                . 
  6653.                                                                                                                                                                                                                                                                of 
  6654.                                                                                                                                                                                                                                                                ios 
  6655.                                                                                                                                                                                                                                                                0 
  6656.                                                                                                                                                                                                                                                                (state 
  6657.                                                                                                                                                                                                                                                                int), 
  6658.                                                                                                                                                                                                                                                                an 
  6659.                                                                                                                                                                                                                                                                usually 
  6660.                                                                                                                                                                                                                                                                encountered 
  6661.                                                                                                                                                                                                                                                                operation 
  6662.                                                                                                                                                                                                                                                                iosobj 
  6663.                                                                                                                                                                                                                                                                colon 
  6664.                                                                                                                                                                                                                                                                extraction. 
  6665.                                                                                                                                                                                                                                                                of 
  6666.                                                                                                                                                                                                                                                                value 
  6667.                                                                                                                                                                                                                                                                usually 
  6668.                                                                                                                                                                                                                                                                encountered 
  6669.                                                                                                                                                                                                                                                                has 
  6670.                                                                                                                                                                                                                                                                iosobj 
  6671.                                                                                                                                                                                                                                                                , 
  6672.                                                                                                                                                                                                                                                                EOF 
  6673.                                                                                                                                                                                                                                                                eof 
  6674.                                                                                                                                                                                                                                                                when 
  6675.                                                                                                                                                                                                                                                                during 
  6676.                                                                                                                                                                                                                                                                in 
  6677.                                                                                                                                                                                                                                                                iosobj 
  6678.                                                                                                                                                                                                                                                                . 
  6679.                                                                                                                                                                                                                                                                nonzero 
  6680.                                                                                                                                                                                                                                                                is, 
  6681.                                                                                                                                                                                                                                                                it 
  6682.                                                                                                                                                                                                                                                                returns::if.::if.if.::if.::if.if.const 
  6683.                                                                                                                                                                                                                                                                operation 
  6684.                                                                                                                                                                                                                                                                set 
  6685.                                                                                                                                                                                                                                                                been 
  6686.                                                                                                                                                                                                                                                                the 
  6687.                                                                                                                                                                                                                                                                an 
  6688.                                                                                                                                                                                                                                                                iosobj 
  6689.                                                                                                                                                                                                                                                                encountered 
  6690.                                                                                                                                                                                                                                                                : 
  6691.  
  6692.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               set.error(returns::if.::if.if.::if.::if.if.constset.());
  6693.                                                                                                                                                                                                                                                                during 
  6694.                                                                                                                                                                                                                                                                ( 
  6695.                                                                                                                                                                                                                                                                ( 
  6696.                                                                                                                                                                                                                                                                : 
  6697.                                                                                                                                                                                                                                                                ,. 
  6698.  
  6699.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ,.an
  6700.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               , set.an
  6701.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ,of nonzero0 :
  6702.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ( been)is;:
  6703.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ( been)is;.an
  6704.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               , set: nonzero0 :  during(during(.an
  6705.  
  6706.                                                                                                                                                                                                                                                                eof 
  6707.                                                                                                                                                                                                                                                                Otherwise; 
  6708.                                                                                                                                                                                                                                                                eofbit 
  6709.                                                                                                                                                                                                                                                                encountered 
  6710.                                                                                                                                                                                                                                                                returns 
  6711.                                                                                                                                                                                                                                                                during 
  6712.                                                                                                                                                                                                                                                                ;EOFencounteredreturnsduringhastheset 
  6713.                                                                                                                                                                                                                                                                ;set:) 
  6714.                                                                                                                                                                                                                                                                is 
  6715.                                                                                                                                                                                                                                                                ; 
  6716.                                                                                                                                                                                                                                                                when.  ;
  6717.  
  6718.                                                                                                                                                                                                                                                                encountered 
  6719.                                                                                                                                                                                                                                                                ,. 
  6720.                                                                                                                                                                                                                                                                Otherwise 
  6721.                                                                                                                                                                                                                                                                eofbit; 
  6722.                                                                                                                                                                                                                                                                returns 
  6723.                                                                                                                                                                                                                                                                during 
  6724.                                                                                                                                                                                                                                                                encountered 
  6725.                                                                                                                                                                                                                                                                usually 
  6726.                                                                                                                                                                                                                                                                encountered 
  6727.                                                                                                                                                                                                                                                                usually 
  6728.                                                                                                                                                                                                                                                                ;state) 
  6729.                                                                                                                                                                                                                                                                is 
  6730.                                                                                                                                                                                                                                                                ; 
  6731.                                                                                                                                                                                                                                                                :encounteredstate) 
  6732.                                                                                                                                                                                                                                                                is 
  6733.                                                                                                                                                                                                                                                                ; ;itifduring(during(operation;
  6734.  
  6735.                                                                                                                                                                                                                                                                returns 
  6736.                                                                                                                                                                                                                                                                during 
  6737.                                                                                                                                                                                                                                                                has 
  6738.                                                                                                                                                                                                                                                                the 
  6739.                                                                                                                                                                                                                                                                set; 
  6740.                                                                                                                                                                                                                                                                set 
  6741.                                                                                                                                                                                                                                                                : 
  6742.                                                                                                                                                                                                                                                                )is;when 
  6743.                                                                                                                                                                                                                                                                Otherwise 
  6744.                                                                                                                                                                                                                                                                const 
  6745.                                                                                                                                                                                                                                                                during 
  6746.                                                                                                                                                                                                                                                                error 
  6747.                                                                                                                                                                                                                                                                colon 
  6748.                                                                                                                                                                                                                                                                int 
  6749.                                                                                                                                                                                                                                                                iosobj 
  6750.                                                                                                                                                                                                                                                                encountered 
  6751.                                                                                                                                                                                                                                                                in 
  6752.                                                                                                                                                                                                                                                                extraction 
  6753.                                                                                                                                                                                                                                                                ios 
  6754.                                                                                                                                                                                                                                                                ; 
  6755.                                                                                                                                                                                                                                                                usually 
  6756.                                                                                                                                                                                                                                                                a 
  6757.                                                                                                                                                                                                                                                                usually 
  6758.                                                                                                                                                                                                                                                                a: 
  6759.                                                                                                                                                                                                                                                                error 
  6760.                                                                                                                                                                                                                                                                ; 
  6761.                                                                                                                                                                                                                                                                set 
  6762.  
  6763.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               error encountered() colon;
  6764.  
  6765.                                                                                                                                                                                                                                                                encountered() 
  6766.                                                                                                                                                                                                                                                                iosobj 
  6767.                                                                                                                                                                                                                                                                a 
  6768.                                                                                                                                                                                                                                                                in 
  6769.                                                                                                                                                                                                                                                                const 
  6770.                                                                                                                                                                                                                                                                extraction::been.::been.: 
  6771.                                                                                                                                                                                                                                                                been 
  6772.                                                                                                                                                                                                                                                                . 
  6773.                                                                                                                                                                                                                                                                : 
  6774.                                                                                                                                                                                                                                                                : 
  6775.                                                                                                                                                                                                                                                                been 
  6776.                                                                                                                                                                                                                                                                . 
  6777.                                                                                                                                                                                                                                                                been 
  6778.                                                                                                                                                                                                                                                                . 
  6779.                                                                                                                                                                                                                                                                anintextraction 
  6780.                                                                                                                                                                                                                                                                : 
  6781.                                                                                                                                                                                                                                                                : 
  6782.                                                                                                                                                                                                                                                                been 
  6783.                                                                                                                                                                                                                                                                . 
  6784.                                                                                                                                                                                                                                                                : 
  6785.                                                                                                                                                                                                                                                                : 
  6786.                                                                                                                                                                                                                                                                been 
  6787.                                                                                                                                                                                                                                                                . 
  6788.                                                                                                                                                                                                                                                                been 
  6789.                                                                                                                                                                                                                                                                . 
  6790.                                                                                                                                                                                                                                                                : 
  6791.                                                                                                                                                                                                                                                                : 
  6792.                                                                                                                                                                                                                                                                been 
  6793.                                                                                                                                                                                                                                                                . 
  6794.                                                                                                                                                                                                                                                                : 
  6795.                                                                                                                                                                                                                                                                : 
  6796.                                                                                                                                                                                                                                                                during 
  6797.                                                                                                                                                                                                                                                                ( 
  6798.                                                                                                                                                                                                                                                                ) 
  6799.  
  6800.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ,.an
  6801.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               , set.an
  6802.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ,of nonzero0 :
  6803.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ( been)is;:
  6804.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ( been)is;.an
  6805.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               , set: nonzero0  .an
  6806.  
  6807.                                                                                                                                                                                                                                                                eof 
  6808.                                                                                                                                                                                                                                                                Otherwise; 
  6809.                                                                                                                                                                                                                                                                eofbit 
  6810.                                                                                                                                                                                                                                                                encountered 
  6811.                                                                                                                                                                                                                                                                returns 
  6812.                                                                                                                                                                                                                                                                during 
  6813.                                                                                                                                                                                                                                                                ; 
  6814.                                                                                                                                                                                                                                                                EOF 
  6815.                                                                                                                                                                                                                                                                encountered 
  6816.                                                                                                                                                                                                                                                                returns 
  6817.                                                                                                                                                                                                                                                                during 
  6818.                                                                                                                                                                                                                                                                has 
  6819.                                                                                                                                                                                                                                                                the 
  6820.                                                                                                                                                                                                                                                                set; 
  6821.                                                                                                                                                                                                                                                                set 
  6822.                                                                                                                                                                                                                                                                : 
  6823.                                                                                                                                                                                                                                                                )is;when 
  6824.                                                                                                                                                                                                                                                                ; 
  6825.  
  6826.                                                                                                                                                                                                                                                                encountered 
  6827.                                                                                                                                                                                                                                                                ,. 
  6828.                                                                                                                                                                                                                                                                Otherwise 
  6829.                                                                                                                                                                                                                                                                eofbitreturns 
  6830.                                                                                                                                                                                                                                                                during 
  6831.                                                                                                                                                                                                                                                                encountered 
  6832.                                                                                                                                                                                                                                                                usually 
  6833.                                                                                                                                                                                                                                                                encountered 
  6834.                                                                                                                                                                                                                                                                usually 
  6835.                                                                                                                                                                                                                                                                ; 
  6836.                                                                                                                                                                                                                                                                state 
  6837.                                                                                                                                                                                                                                                                )is;: 
  6838.                                                                                                                                                                                                                                                                encountered 
  6839.                                                                                                                                                                                                                                                                state 
  6840.                                                                                                                                                                                                                                                                )is;; 
  6841.                                                                                                                                                                                                                                                                it 
  6842.                                                                                                                                                                                                                                                                if 
  6843.                                                                                                                                                                                                                                                                : 
  6844.                                                                                                                                                                                                                                                                value 
  6845.                                                                                                                                                                                                                                                                operation 
  6846.                                                                                                                                                                                                                                                                ; 
  6847.  
  6848.                                                                                                                                                                                                                                                                returns 
  6849.                                                                                                                                                                                                                                                                during 
  6850.                                                                                                                                                                                                                                                                has 
  6851.                                                                                                                                                                                                                                                                the 
  6852.                                                                                                                                                                                                                                                                , 
  6853.                                                                                                                                                                                                                                                                . 
  6854.                                                                                                                                                                                                                                                                ;set:) 
  6855.                                                                                                                                                                                                                                                                is 
  6856.                                                                                                                                                                                                                                                                ; 
  6857.                                                                                                                                                                                                                                                                when;Otherwiseconstduringerrorcolonintiosobjencounteredinextractionios;usuallyausuallya :error; 0
  6858.  
  6859.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               int eof() const;
  6860.  
  6861.                                                                                                                                                                                                                                                                eof() 
  6862.                                                                                                                                                                                                                                                                returns 
  6863.                                                                                                                                                                                                                                                                a 
  6864.                                                                                                                                                                                                                                                                nonzero 
  6865.                                                                                                                                                                                                                                                                value 
  6866.                                                                                                                                                                                                                                                                if 
  6867.                                                                                                                                                                                                                                                                ios::colon.::colon.colon.::colon.::colon.colon.eofbit 
  6868.                                                                                                                                                                                                                                                                is 
  6869.                                                                                                                                                                                                                                                                set 
  6870.                                                                                                                                                                                                                                                                in 
  6871.                                                                                                                                                                                                                                                                the 
  6872.                                                                                                                                                                                                                                                                error 
  6873.                                                                                                                                                                                                                                                                state 
  6874.                                                                                                                                                                                                                                                                of 
  6875.                                                                                                                                                                                                                                                                iosobj. 
  6876.                                                                                                                                                                                                                                                                Otherwise, 
  6877.                                                                                                                                                                                                                                                                it 
  6878.                                                                                                                                                                                                                                                                returns 
  6879.                                                                                                                                                                                                                                                                0. 
  6880.                                                                                                                                                                                                                                                                ios::colon.::colon.colon.::colon.::colon.colon.eofbit 
  6881.                                                                                                                                                                                                                                                                is 
  6882.                                                                                                                                                                                                                                                                usually 
  6883.                                                                                                                                                                                                                                                                set 
  6884.                                                                                                                                                                                                                                                                when 
  6885.                                                                                                                                                                                                                                                                an 
  6886.                                                                                                                                                                                                                                                                EOF 
  6887.                                                                                                                                                                                                                                                                has 
  6888.                                                                                                                                                                                                                                                                been 
  6889.                                                                                                                                                                                                                                                                encountered 
  6890.                                                                                                                                                                                                                                                                during 
  6891.                                                                                                                                                                                                                                                                an 
  6892.                                                                                                                                                                                                                                                                extraction 
  6893.                                                                                                                                                                                                                                                                operation. 
  6894.                                                                                                                                                                                                                                                                ;EOFencounteredreturnsduringhastheset 
  6895.                                                                                                                                                                                                                                                                ;set:) 
  6896.                                                                                                                                                                                                                                                                is 
  6897.                                                                                                                                                                                                                                                                ; when;
  6898.  
  6899.                                                                                                                                                                                                                                                                encountered 
  6900.                                                                                                                                                                                                                                                                ) 
  6901.  
  6902.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ,.an
  6903.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               , set.an
  6904.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               during(of nonzero0 :
  6905.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ( been)is;:
  6906.  
  6907.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ifstream();
  6908.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ifstream(int d);
  6909.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ifstream(const char* fname,
  6910.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        int mode=ios&c2.in,
  6911.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        int prot=filebuf&c2.openprot);
  6912.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ifstream(int d, char* p, int len);
  6913.  
  6914.                                                                                                                                                                                                                                                                There 
  6915.                                                                                                                                                                                                                                                                are 
  6916.                                                                                                                                                                                                                                                                four 
  6917.                                                                                                                                                                                                                                                                versions 
  6918.                                                                                                                                                                                                                                                                of 
  6919.                                                                                                                                                                                                                                                                the 
  6920.                                                                                                                                                                                                                                                                ifstream 
  6921.                                                                                                                                                                                                                                                                constructor. 
  6922.                                                                                                                                                                                                                                                                The 
  6923.                                                                                                                                                                                                                                                                first 
  6924.                                                                                                                                                                                                                                                                version 
  6925.                                                                                                                                                                                                                                                                takes 
  6926.                                                                                                                                                                                                                                                                no 
  6927.                                                                                                                                                                                                                                                                arguments 
  6928.                                                                                                                                                                                                                                                                and 
  6929.                                                                                                                                                                                                                                                                constructs 
  6930.                                                                                                                                                                                                                                                                an 
  6931.                                                                                                                                                                                                                                                                unopened 
  6932.                                                                                                                                                                                                                                                                ifstream 
  6933.                                                                                                                                                                                                                                                                object. 
  6934.                                                                                                                                                                                                                                                                The 
  6935.                                                                                                                                                                                                                                                                second 
  6936.                                                                                                                                                                                                                                                                version 
  6937.                                                                                                                                                                                                                                                                takes 
  6938.                                                                                                                                                                                                                                                                one 
  6939.                                                                                                                                                                                                                                                                argument 
  6940.                                                                                                                                                                                                                                                                and 
  6941.                                                                                                                                                                                                                                                                constructs 
  6942.                                                                                                                                                                                                                                                                an 
  6943.                                                                                                                                                                                                                                                                ifstream 
  6944.                                                                                                                                                                                                                                                                object 
  6945.                                                                                                                                                                                                                                                                that 
  6946.                                                                                                                                                                                                                                                                is 
  6947.                                                                                                                                                                                                                                                                attached 
  6948.                                                                                                                                                                                                                                                                to 
  6949.                                                                                                                                                                                                                                                                the 
  6950.                                                                                                                                                                                                                                                                file 
  6951.                                                                                                                                                                                                                                                                descriptor 
  6952.                                                                                                                                                                                                                                                                d. 
  6953.                                                                                                                                                                                                                                                                If 
  6954.                                                                                                                                                                                                                                                                d 
  6955.                                                                                                                                                                                                                                                                is 
  6956.                                                                                                                                                                                                                                                                not 
  6957.                                                                                                                                                                                                                                                                open, 
  6958.                                                                                                                                                                                                                                                                ios&c2.failbit 
  6959.                                                                                                                                                                                                                                                                is 
  6960.                                                                                                                                                                                                                                                                set 
  6961.                                                                                                                                                                                                                                                                in 
  6962.                                                                                                                                                                                                                                                                the 
  6963.                                                                                                                                                                                                                                                                format 
  6964.                                                                                                                                                                                                                                                                state 
  6965.                                                                                                                                                                                                                                                                of 
  6966.                                                                                                                                                                                                                                                                ifs. 
  6967.  
  6968.                                                                                                                                                                                                                                                                The 
  6969.                                                                                                                                                                                                                                                                third 
  6970.                                                                                                                                                                                                                                                                and 
  6971.                                                                                                                                                                                                                                                                fourth 
  6972.                                                                                                                                                                                                                                                                versions 
  6973.                                                                                                                                                                                                                                                                of 
  6974.                                                                                                                                                                                                                                                                the 
  6975.                                                                                                                                                                                                                                                                ifstream() 
  6976.                                                                                                                                                                                                                                                                constructor 
  6977.                                                                                                                                                                                                                                                                take 
  6978.                                                                                                                                                                                                                                                                three 
  6979.                                                                                                                                                                                                                                                                arguments. 
  6980.                                                                                                                                                                                                                                                                The 
  6981.                                                                                                                                                                                                                                                                third 
  6982.                                                                                                                                                                                                                                                                version 
  6983.                                                                                                                                                                                                                                                                constructs 
  6984.                                                                                                                                                                                                                                                                an 
  6985.                                                                                                                                                                                                                                                                ifstream 
  6986.                                                                                                                                                                                                                                                                object 
  6987.                                                                                                                                                                                                                                                                and 
  6988.                                                                                                                                                                                                                                                                opens 
  6989.                                                                                                                                                                                                                                                                the 
  6990.                                                                                                                                                                                                                                                                file 
  6991.                                                                                                                                                                                                                                                                fname 
  6992.                                                                                                                                                                                                                                                                with 
  6993.                                                                                                                                                                                                                                                                open 
  6994.                                                                                                                                                                                                                                                                mode 
  6995.                                                                                                                                                                                                                                                                equal 
  6996.                                                                                                                                                                                                                                                                to 
  6997.                                                                                                                                                                                                                                                                mode 
  6998.                                                                                                                                                                                                                                                                and 
  6999.                                                                                                                                                                                                                                                                protection 
  7000.                                                                                                                                                                                                                                                                mode 
  7001.                                                                                                                                                                                                                                                                equal 
  7002.                                                                                                                                                                                                                                                                to 
  7003.                                                                                                                                                                                                                                                                prot. 
  7004.                                                                                                                                                                                                                                                                The 
  7005.                                                                                                                                                                                                                                                                default 
  7006.                                                                                                                                                                                                                                                                value 
  7007.                                                                                                                                                                                                                                                                for 
  7008.                                                                                                                                                                                                                                                                mode 
  7009.                                                                                                                                                                                                                                                                is 
  7010.                                                                                                                                                                                                                                                                ios&c2.in, 
  7011.                                                                                                                                                                                                                                                                and 
  7012.                                                                                                                                                                                                                                                                the 
  7013.                                                                                                                                                                                                                                                                default 
  7014.                                                                                                                                                                                                                                                                value 
  7015.                                                                                                                                                                                                                                                                for 
  7016.                                                                                                                                                                                                                                                                prot 
  7017.                                                                                                                                                                                                                                                                is 
  7018.                                                                                                                                                                                                                                                                filebuf&c2.openprot. 
  7019.                                                                                                                                                                                                                                                                If 
  7020.                                                                                                                                                                                                                                                                the 
  7021.                                                                                                                                                                                                                                                                file 
  7022.                                                                                                                                                                                                                                                                cannot 
  7023.                                                                                                                                                                                                                                                                be 
  7024.                                                                                                                                                                                                                                                                opened, 
  7025.                                                                                                                                                                                                                                                                the 
  7026.                                                                                                                                                                                                                                                                error 
  7027.                                                                                                                                                                                                                                                                state 
  7028.                                                                                                                                                                                                                                                                of 
  7029.                                                                                                                                                                                                                                                                the 
  7030.                                                                                                                                                                                                                                                                constructed 
  7031.                                                                                                                                                                                                                                                                ifstream 
  7032.                                                                                                                                                                                                                                                                object 
  7033.                                                                                                                                                                                                                                                                is 
  7034.                                                                                                                                                                                                                                                                set. 
  7035.  
  7036.                                                                                                                                                                                                                                                                The 
  7037.                                                                                                                                                                                                                                                                fourth 
  7038.                                                                                                                                                                                                                                                                version 
  7039.                                                                                                                                                                                                                                                                constructs 
  7040.                                                                                                                                                                                                                                                                an 
  7041.                                                                                                                                                                                                                                                                ifstream 
  7042.                                                                                                                                                                                                                                                                object 
  7043.                                                                                                                                                                                                                                                                that 
  7044.                                                                                                                                                                                                                                                                is 
  7045.                                                                                                                                                                                                                                                                attached 
  7046.                                                                                                                                                                                                                                                                to 
  7047.                                                                                                                                                                                                                                                                the 
  7048.                                                                                                                                                                                                                                                                file 
  7049.                                                                                                                                                                                                                                                                descriptor 
  7050.                                                                                                                                                                                                                                                                d. 
  7051.                                                                                                                                                                                                                                                                If 
  7052.                                                                                                                                                                                                                                                                d 
  7053.                                                                                                                                                                                                                                                                is 
  7054.                                                                                                                                                                                                                                                                not 
  7055.                                                                                                                                                                                                                                                                open, 
  7056.                                                                                                                                                                                                                                                                ios&c2.failbit 
  7057.                                                                                                                                                                                                                                                                is 
  7058.                                                                                                                                                                                                                                                                set 
  7059.                                                                                                                                                                                                                                                                in 
  7060.                                                                                                                                                                                                                                                                the 
  7061.                                                                                                                                                                                                                                                                format 
  7062.                                                                                                                                                                                                                                                                state 
  7063.                                                                                                                                                                                                                                                                of 
  7064.                                                                                                                                                                                                                                                                ifs. 
  7065.                                                                                                                                                                                                                                                                This 
  7066.                                                                                                                                                                                                                                                                constructor 
  7067.                                                                                                                                                                                                                                                                also 
  7068.                                                                                                                                                                                                                                                                sets 
  7069.                                                                                                                                                                                                                                                                up 
  7070.                                                                                                                                                                                                                                                                an 
  7071.                                                                                                                                                                                                                                                                associated 
  7072.                                                                                                                                                                                                                                                                filebuf 
  7073.                                                                                                                                                                                                                                                                object 
  7074.                                                                                                                                                                                                                                                                with 
  7075.                                                                                                                                                                                                                                                                a 
  7076.                                                                                                                                                                                                                                                                stream 
  7077.                                                                                                                                                                                                                                                                buffer 
  7078.                                                                                                                                                                                                                                                                that 
  7079.                                                                                                                                                                                                                                                                has 
  7080.                                                                                                                                                                                                                                                                length 
  7081.                                                                                                                                                                                                                                                                len 
  7082.                                                                                                                                                                                                                                                                bytes 
  7083.                                                                                                                                                                                                                                                                and 
  7084.                                                                                                                                                                                                                                                                begins 
  7085.                                                                                                                                                                                                                                                                at 
  7086.                                                                                                                                                                                                                                                                the 
  7087.                                                                                                                                                                                                                                                                position 
  7088.                                                                                                                                                                                                                                                                pointed 
  7089.                                                                                                                                                                                                                                                                to 
  7090.                                                                                                                                                                                                                                                                by 
  7091.                                                                                                                                                                                                                                                                p. 
  7092.                                                                                                                                                                                                                                                                If 
  7093.                                                                                                                                                                                                                                                                p 
  7094.                                                                                                                                                                                                                                                                is 
  7095.                                                                                                                                                                                                                                                                equal 
  7096.                                                                                                                                                                                                                                                                to 
  7097.                                                                                                                                                                                                                                                                0 
  7098.                                                                                                                                                                                                                                                                or 
  7099.                                                                                                                                                                                                                                                                len 
  7100.                                                                                                                                                                                                                                                                is 
  7101.                                                                                                                                                                                                                                                                equal 
  7102.                                                                                                                                                                                                                                                                to 
  7103.                                                                                                                                                                                                                                                                0, 
  7104.                                                                                                                                                                                                                                                                the 
  7105.                                                                                                                                                                                                                                                                associated 
  7106.                                                                                                                                                                                                                                                                filebuf 
  7107.                                                                                                                                                                                                                                                                object 
  7108.                                                                                                                                                                                                                                                                is 
  7109.                                                                                                                                                                                                                                                                unbuffered. 
  7110.  
  7111.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               int fail() const;
  7112.  
  7113.                                                                                                                                                                                                                                                                fail() 
  7114.                                                                                                                                                                                                                                                                returns 
  7115.                                                                                                                                                                                                                                                                a 
  7116.                                                                                                                                                                                                                                                                nonzero 
  7117.                                                                                                                                                                                                                                                                value 
  7118.                                                                                                                                                                                                                                                                if 
  7119.                                                                                                                                                                                                                                                                either 
  7120.                                                                                                                                                                                                                                                                ios::colon.::colon.colon.::colon.::colon.colon.badbit 
  7121.                                                                                                                                                                                                                                                                or 
  7122.                                                                                                                                                                                                                                                                ios::colon.::colon.colon.::colon.::colon.colon.failbit 
  7123.                                                                                                                                                                                                                                                                is 
  7124.                                                                                                                                                                                                                                                                set 
  7125.                                                                                                                                                                                                                                                                in 
  7126.                                                                                                                                                                                                                                                                the 
  7127.                                                                                                                                                                                                                                                                error 
  7128.                                                                                                                                                                                                                                                                state. 
  7129.                                                                                                                                                                                                                                                                Otherwise, 
  7130.                                                                                                                                                                                                                                                                it 
  7131.                                                                                                                                                                                                                                                                returns 
  7132.                                                                                                                                                                                                                                                                0. 
  7133.                                                                                                                                                                                                                                                                , 
  7134.                                                                                                                                                                                                                                                                returns 
  7135.                                                                                                                                                                                                                                                                colon 
  7136.                                                                                                                                                                                                                                                                badbit 
  7137.                                                                                                                                                                                                                                                                returns 
  7138.                                                                                                                                                                                                                                                                fail 
  7139.                                                                                                                                                                                                                                                                : 
  7140.  
  7141.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               .int(::it.::it.it.::it.::it.it.either.());
  7142.                                                                                                                                                                                                                                                                error 
  7143.                                                                                                                                                                                                                                                                ( 
  7144.                                                                                                                                                                                                                                                                ( 
  7145.                                                                                                                                                                                                                                                                : 
  7146.                                                                                                                                                                                                                                                                ; 
  7147.                                                                                                                                                                                                                                                                in 
  7148.                                                                                                                                                                                                                                                                fail 
  7149.                                                                                                                                                                                                                                                                error 
  7150.                                                                                                                                                                                                                                                                ; 
  7151.                                                                                                                                                                                                                                                                if 
  7152.                                                                                                                                                                                                                                                                fail 
  7153.                                                                                                                                                                                                                                                                is 
  7154.                                                                                                                                                                                                                                                                ; 
  7155.                                                                                                                                                                                                                                                                : 
  7156.                                                                                                                                                                                                                                                                )set;; 
  7157.  
  7158.                                                                                                                                                                                                                                                                fail 
  7159.                                                                                                                                                                                                                                                                ,. 
  7160.                                                                                                                                                                                                                                                                badbit 
  7161.                                                                                                                                                                                                                                                                , 
  7162.                                                                                                                                                                                                                                                                . 
  7163.                                                                                                                                                                                                                                                                badbit 
  7164.                                                                                                                                                                                                                                                                , 
  7165.                                                                                                                                                                                                                                                                value 
  7166.                                                                                                                                                                                                                                                                the 
  7167.                                                                                                                                                                                                                                                                0 
  7168.                                                                                                                                                                                                                                                                : 
  7169.                                                                                                                                                                                                                                                                ( 
  7170.                                                                                                                                                                                                                                                                colon 
  7171.                                                                                                                                                                                                                                                                ) 
  7172.                                                                                                                                                                                                                                                                set 
  7173.                                                                                                                                                                                                                                                                ; 
  7174.                                                                                                                                                                                                                                                                : 
  7175.                                                                                                                                                                                                                                                                ( 
  7176.                                                                                                                                                                                                                                                                colon 
  7177.                                                                                                                                                                                                                                                                ) 
  7178.                                                                                                                                                                                                                                                                set 
  7179.                                                                                                                                                                                                                                                                ; 
  7180.                                                                                                                                                                                                                                                                . 
  7181.                                                                                                                                                                                                                                                                badbit 
  7182.                                                                                                                                                                                                                                                                , 
  7183.                                                                                                                                                                                                                                                                : 
  7184.                                                                                                                                                                                                                                                                the 
  7185.                                                                                                                                                                                                                                                                0 
  7186.                                                                                                                                                                                                                                                                : 
  7187.                                                                                                                                                                                                                                                                error 
  7188.                                                                                                                                                                                                                                                                ( 
  7189.                                                                                                                                                                                                                                                                error 
  7190.                                                                                                                                                                                                                                                                ( 
  7191.                                                                                                                                                                                                                                                                . 
  7192.                                                                                                                                                                                                                                                                badbit 
  7193.                                                                                                                                                                                                                                                                either 
  7194.  
  7195.                                                                                                                                                                                                                                                                failbit 
  7196.                                                                                                                                                                                                                                                                ; 
  7197.                                                                                                                                                                                                                                                                in 
  7198.                                                                                                                                                                                                                                                                fail 
  7199.                                                                                                                                                                                                                                                                error 
  7200.                                                                                                                                                                                                                                                                ;iffailerroris;:) 
  7201.                                                                                                                                                                                                                                                                set 
  7202.                                                                                                                                                                                                                                                                ; 
  7203.                                                                                                                                                                                                                                                                .  ;
  7204.  
  7205.                                                                                                                                                                                                                                                                fail 
  7206.                                                                                                                                                                                                                                                                , 
  7207.                                                                                                                                                                                                                                                                .in 
  7208.                                                                                                                                                                                                                                                                ;errorfailfail; 
  7209.                                                                                                                                                                                                                                                                )set;: 
  7210.                                                                                                                                                                                                                                                                fail 
  7211.                                                                                                                                                                                                                                                                )set;returns  ;stateiterror(error(;
  7212.  
  7213.                                                                                                                                                                                                                                                                error 
  7214.                                                                                                                                                                                                                                                                is 
  7215.                                                                                                                                                                                                                                                                ; 
  7216.                                                                                                                                                                                                                                                                : 
  7217.                                                                                                                                                                                                                                                                )set;either 
  7218.                                                                                                                                                                                                                                                                error 
  7219.                                                                                                                                                                                                                                                                int 
  7220.                                                                                                                                                                                                                                                                const 
  7221.                                                                                                                                                                                                                                                                or 
  7222.                                                                                                                                                                                                                                                                ( 
  7223.                                                                                                                                                                                                                                                                returns 
  7224.                                                                                                                                                                                                                                                                fail 
  7225.                                                                                                                                                                                                                                                                nonzero 
  7226.                                                                                                                                                                                                                                                                ios 
  7227.                                                                                                                                                                                                                                                                Otherwise 
  7228.                                                                                                                                                                                                                                                                ; 
  7229.                                                                                                                                                                                                                                                                a 
  7230.                                                                                                                                                                                                                                                                a: 
  7231.                                                                                                                                                                                                                                                                int 
  7232.                                                                                                                                                                                                                                                                ; 
  7233.  
  7234.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               int fail() const;
  7235.  
  7236.                                                                                                                                                                                                                                                                fail() 
  7237.                                                                                                                                                                                                                                                                returns 
  7238.                                                                                                                                                                                                                                                                a 
  7239.                                                                                                                                                                                                                                                                nonzero 
  7240.                                                                                                                                                                                                                                                                either 
  7241.                                                                                                                                                                                                                                                                ios::colon.::colon.: 
  7242.                                                                                                                                                                                                                                                                colon 
  7243.                                                                                                                                                                                                                                                                . 
  7244.                                                                                                                                                                                                                                                                : 
  7245.                                                                                                                                                                                                                                                                : 
  7246.                                                                                                                                                                                                                                                                colon 
  7247.                                                                                                                                                                                                                                                                . 
  7248.                                                                                                                                                                                                                                                                colon 
  7249.                                                                                                                                                                                                                                                                . 
  7250.                                                                                                                                                                                                                                                                badbitorios 
  7251.                                                                                                                                                                                                                                                                : 
  7252.                                                                                                                                                                                                                                                                : 
  7253.                                                                                                                                                                                                                                                                colon 
  7254.                                                                                                                                                                                                                                                                . 
  7255.                                                                                                                                                                                                                                                                : 
  7256.                                                                                                                                                                                                                                                                : 
  7257.                                                                                                                                                                                                                                                                colon 
  7258.                                                                                                                                                                                                                                                                . 
  7259.                                                                                                                                                                                                                                                                colon 
  7260.                                                                                                                                                                                                                                                                . 
  7261.                                                                                                                                                                                                                                                                : 
  7262.                                                                                                                                                                                                                                                                : 
  7263.                                                                                                                                                                                                                                                                colon 
  7264.                                                                                                                                                                                                                                                                . 
  7265.                                                                                                                                                                                                                                                                : 
  7266.                                                                                                                                                                                                                                                                : 
  7267.                                                                                                                                                                                                                                                                error 
  7268.                                                                                                                                                                                                                                                                ( 
  7269.                                                                                                                                                                                                                                                                ) 
  7270.  
  7271.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ,.badbit
  7272.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               , .badbit
  7273.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ,value the0 :
  7274.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ( colon)set;:
  7275.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ( colon).badbit
  7276.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               , : the0   .badbit
  7277.  
  7278.                                                                                                                                                                                                                                                                failbit 
  7279.                                                                                                                                                                                                                                                                ; 
  7280.                                                                                                                                                                                                                                                                in 
  7281.                                                                                                                                                                                                                                                                fail 
  7282.                                                                                                                                                                                                                                                                error 
  7283.                                                                                                                                                                                                                                                                ; 
  7284.                                                                                                                                                                                                                                                                if 
  7285.                                                                                                                                                                                                                                                                fail 
  7286.                                                                                                                                                                                                                                                                error 
  7287.                                                                                                                                                                                                                                                                is 
  7288.                                                                                                                                                                                                                                                                ; 
  7289.                                                                                                                                                                                                                                                                )set;; 
  7290.  
  7291.                                                                                                                                                                                                                                                                fail 
  7292.                                                                                                                                                                                                                                                                ,. 
  7293.                                                                                                                                                                                                                                                                in; 
  7294.                                                                                                                                                                                                                                                                error 
  7295.                                                                                                                                                                                                                                                                fail 
  7296.                                                                                                                                                                                                                                                                fail 
  7297.                                                                                                                                                                                                                                                                ; 
  7298.                                                                                                                                                                                                                                                                )set;: 
  7299.                                                                                                                                                                                                                                                                fail 
  7300.                                                                                                                                                                                                                                                                )set;; 
  7301.                                                                                                                                                                                                                                                                state 
  7302.                                                                                                                                                                                                                                                                it 
  7303.                                                                                                                                                                                                                                                                : 
  7304.                                                                                                                                                                                                                                                                ; 
  7305.  
  7306.                                                                                                                                                                                                                                                                error 
  7307.                                                                                                                                                                                                                                                                is 
  7308.                                                                                                                                                                                                                                                                ,.; 
  7309.                                                                                                                                                                                                                                                                : 
  7310.                                                                                                                                                                                                                                                                ) 
  7311.                                                                                                                                                                                                                                                                set 
  7312.                                                                                                                                                                                                                                                                ; 
  7313.                                                                                                                                                                                                                                                                ;eithererrorintconstorreturnsfailnonzeroiosOtherwise;aa :int;
  7314.  
  7315.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               or failbit() either;
  7316.  
  7317.                                                                                                                                                                                                                                                                failbit() 
  7318.                                                                                                                                                                                                                                                                a 
  7319.                                                                                                                                                                                                                                                                the 
  7320.                                                                                                                                                                                                                                                                it 
  7321.                                                                                                                                                                                                                                                                Otherwise::const.::const.const.::const.::const.const.in 
  7322.                                                                                                                                                                                                                                                                set 
  7323.                                                                                                                                                                                                                                                                nonzero 
  7324.                                                                                                                                                                                                                                                                int 
  7325.                                                                                                                                                                                                                                                                value 
  7326.                                                                                                                                                                                                                                                                returns. 
  7327.                                                                                                                                                                                                                                                                , 
  7328.                                                                                                                                                                                                                                                                state 
  7329.                                                                                                                                                                                                                                                                0. 
  7330.                                                                                                                                                                                                                                                                Otherwise::const.::const.const.::const.::const.in 
  7331.                                                                                                                                                                                                                                                                set 
  7332.                                                                                                                                                                                                                                                                badbit 
  7333.                                                                                                                                                                                                                                                                if 
  7334.                                                                                                                                                                                                                                                                is 
  7335.                                                                                                                                                                                                                                                                colon 
  7336.                                                                                                                                                                                                                                                                fail 
  7337.                                                                                                                                                                                                                                                                error 
  7338.                                                                                                                                                                                                                                                                badbit 
  7339.                                                                                                                                                                                                                                                                ios 
  7340.                                                                                                                                                                                                                                                                . 
  7341.                                                                                                                                                                                                                                                                ;iffailerroris;:) 
  7342.                                                                                                                                                                                                                                                                set 
  7343.                                                                                                                                                                                                                                                                ; ;
  7344.  
  7345.                                                                                                                                                                                                                                                                fail 
  7346.  
  7347.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ,.badbit
  7348.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               , .badbit
  7349.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               error(value the0 :
  7350.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ( colon)set;:
  7351.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               )
  7352.  
  7353.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ,.badbit
  7354.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               , .badbit
  7355.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ,value the0 :
  7356.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ( colon
  7357.  
  7358.  
  7359. ΓòÉΓòÉΓòÉ <hidden> n.colon.::colon.::colon.colon.failbit and ios::colon.::co ΓòÉΓòÉΓòÉ
  7360.  
  7361. ; : 
  7362. (  colon ) set ; . badbit 
  7363. ,  :  the 0  :   . badbit 
  7364.  
  7365. failbit ; in fail error ; if fail error is ;:) set ; ;
  7366.  
  7367. fail ,. in; error fail fail ; )set;: fail )set;; state it : ; 
  7368.  
  7369. error is ; : )set;; either error int const or returns fail nonzero ios 
  7370. Otherwise ; a a: int ; error state. Otherwise, it returns 0.  ,returns colonbadbitreturnsfail:
  7371.  
  7372. .int(::it.::it.it.::it.::it.it.either.());
  7373.  error ( ( :    . badbit 
  7374.  
  7375. failbit  ;infailerror;iffail is;:) set ; ;
  7376.  
  7377. fail ,. :   error ( error ( . badbit 
  7378.  either 
  7379.  
  7380. failbit ; in fail error  ;iffailerroris;:) set ; .  ;
  7381.  
  7382. fail  , .in ;errorfailfail ; )set;: fail 
  7383. )set; returns ; state it error ( error ( ; 
  7384.  
  7385. error is ; : )set; either error int const or either 
  7386. ios::colon.::colon.colon :colon.::colon.colon.badbit or ios::colon.::colon.colon.::colon.::error()
  7387.  
  7388. ,.badbit
  7389. , .badbit
  7390. ,value the0 :
  7391. ( colon)set;( colon)set .badbit
  7392. , : the0   .badbit
  7393.  
  7394. failbit ; in fail error ; if fail error is 
  7395. ; )set;; 
  7396.  
  7397. fail ,. in;  error fail fail ( ;  )set;: fail )set;; state it : ; 
  7398.  
  7399. error is  ,. ; . ( :  ) set ; ;eithererrorintconstorreturnsfailnonzeroiosOtherwise;a
  7400.  
  7401. or failbit() either;
  7402.  
  7403. failbit() a the it Otherwise::const.::const.const.::const.::const.const.in set 
  7404. nonzero int value returns. , state 0. 
  7405. Otherwise::const.::const.const.::const.::const.in set badbit if is colon fail 
  7406. error badbit ios .  ;iffailerroris;:) set ; ;
  7407.  
  7408. fail 
  7409.  
  7410. ,.badbit
  7411. , .badbit
  7412. error(value the0 :
  7413. ( colon)set;:
  7414. )
  7415.  
  7416. ,.badbit
  7417. , .badbit
  7418. ,value the0 :
  7419. ( colon;:
  7420. ( colon)set;.badbit
  7421. , : the0 :  .badbit
  7422.  
  7423. failbit ; in fail error ; if fail error is ;:) set ; ;
  7424.  
  7425. fail ,. in; error fail fail ; )set;: fail )set;; state it : ; 
  7426.  
  7427. error is ; : )set;; either error int const or returns fail nonzero ios 
  7428. Otherwise ; a a: int ; error state. Otherwise, it returns 0.  ,returns colonbadbitreturnsfail:
  7429.  
  7430. .int(::it.::it.it.::it.::it.it.either.());
  7431.  error ( ( :    . badbit 
  7432.  
  7433. failbit  ;infailerror;iffail is;:) set ; ;
  7434.  
  7435. fail ,. :   error ( error ( . badbit 
  7436.  either 
  7437.  
  7438. failbit ; in fail error  ;iffailerroris;:) set ; .  ;
  7439.  
  7440. fail  , .in ;errorfailfail ; )set;: fail )set; returns ; state it error ( error 
  7441. ( ; 
  7442.  
  7443. error is ; : )set;
  7444.  
  7445. ifstream();
  7446. ifstream(int d);
  7447. ifstream(const char* fname,
  7448.          int mode=ios&c2.in,
  7449.          int prot=filebuf&c2.openprot);
  7450. ifstream(int d, char* p, int len);
  7451.  
  7452. There are four versions of the ifstream constructor. The first version takes no 
  7453. arguments and constructs an unopened ifstream object. The second version takes 
  7454. one argument and constructs an ifstream object that is attached to the file 
  7455. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  7456. ifs. 
  7457.  
  7458. The third and fourth versions of the ifstream() constructor take three 
  7459. arguments. The third version constructs an ifstream object and opens the file 
  7460. fname with open mode equal to mode and protection mode equal to prot. The 
  7461. default value for mode is ios&c2.in, and the default value for prot is 
  7462. filebuf&c2.openprot. If the file cannot be opened, the error state of the 
  7463. constructed ifstream object is set. 
  7464.  
  7465. The fourth version constructs an ifstream object that is attached to the file 
  7466. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  7467. ifs. This constructor also sets up an associated filebuf object with a stream 
  7468. buffer that has length len bytes and begins at the position pointed to by p. If 
  7469. p is equal to 0 or len is equal to 0, the associated filebuf object is 
  7470. unbuffered. 
  7471.  
  7472. void clear(int state=0);
  7473.  
  7474. clear() changes the error state of iosobj to state. If state equals 0 (its 
  7475. default), all of the bits in the error state are cleared. If you want to set 
  7476. one of the bits without clearing the other bits in the error state, you can 
  7477. bitwise OR the bit you want to set with the current error state. For example, 
  7478. the following statement sets 
  7479. ios::colon.::colon.colon.::colon.::colon.colon.badbit in iosobj and leaves all 
  7480. the other error state bits unchanged: 
  7481.  
  7482. iosobj.clear(ios::colon.::colon.colon.::colon.::colon.colon.badbit|iosobj.rdstate());
  7483. If  For 0  sets : 
  7484. ( you  and | ) example ; without : 
  7485. without ) 
  7486.  
  7487. with,.all
  7488. with,you iosobj.all
  7489. with,If For0 sets:
  7490. (you and| ;without:
  7491. (you andrdstate)example;.all
  7492. with,you iosobj: For0 : you .all
  7493.  
  7494. bitwise the with int; set changes bits ios bit with ; can bits ios bit with 
  7495. clearing other leaves  ;voidiosobj:| ) example ; ORwithoutstatementwant .  ;
  7496.  
  7497. bits to with,. int changes; ios bit with bits other sets of bits  ; its state 
  7498. |)example;without: bits its state rdstate)example;; void other following colon 
  7499. : one in with ; 
  7500.  
  7501. to ios bit with clearing other leaves iosobj ;voidiosobj:| ) example ; 
  7502. ORwithoutstatementwant ;intbadbitbitclearrdstatearedefaultunchangedcurrent 
  7503. cleared equals ; void of =  of =: clear rdstate ; 
  7504. ,error iniosobjandleavesalltheothererrorstatebitsunchanged :
  7505.  
  7506. iosobj.clear(ios::colon.::colon.colon.::colon.::colon.colon.badbit|iosobj.rdstate());
  7507.  ( :  you   with,. . all 
  7508.  badbit 
  7509.  
  7510. bitwise the with int; set changes bits ios bit with 
  7511. ;canbitsiosbitwithclearingotherleavesiosobj ;voidiosobj:| ) example ; 
  7512. ORwithoutstatementwant  .  ;
  7513.  
  7514. bits to  , .intchanges ;iosbitwithbitsothersetsofbitsof ; its state 
  7515. |)example;without: bits its state rdstate)example; error ; void other following 
  7516. colon bit ( in with ; 
  7517.  
  7518. to ios bit with clearing other leaves iosobj; void iosobj : |)example;OR 
  7519. without  wantwithout ) 
  7520.  
  7521. with,.all
  7522. with,you iosobj.all
  7523. with,If For0 sets:
  7524. (you and|)example;without:
  7525. (you andrdstate)example;.all
  7526. with,you iosobj: For0 : you .all
  7527.  
  7528. bitwise the with int; set changes bits ios bit with ; can bits ios bit with 
  7529. clearing other leaves iosobj.  ;voidiosobj:| ) example ; ORwithoutstatementwant ;
  7530.  
  7531. bits to with,. int changes; ios bit with bits other sets of bits of ; its state 
  7532. |)example;without: bits its state rdstate)example;; void other following colon 
  7533. : one in with ; 
  7534.  
  7535. to ios bit with clearing other leaves iosobj; void iosobj : |)example;without 
  7536. statement want; int badbit bit clear rdstate are default unchanged error bits 
  7537. current cleared equals ; void of = of =: clear rdstate ; following  :oneinwith;
  7538.  
  7539. to ios bit with clearing other leaves  ,. ; void  . ( iosobj :  | ) example ; 
  7540. ORwithoutstatementwant ;intbadbitbitclearrdstatearedefaultunchangederrorbitscurrentclearedequals;voidof=
  7541.  
  7542. void clear(int state=0);
  7543.  
  7544. clear() changes the error state of iosobj to state. If state equals 0 (its 
  7545. default), all of the bits in the error state are cleared. If you want to set 
  7546. one of the bits without clearing the other bits in the error state, you can 
  7547. bitwise OR the bit you want to set with the current error state. For example, 
  7548. the following statement sets 
  7549. ios::colon.::colon.colon.::colon.::colon.colon.badbit in iosobj and leaves all 
  7550. the other error state bits unchanged: 
  7551.  
  7552. iosobj.clear(ios::colon.::colon.colon.::colon.::colon.colon.badbit|iosobj.rdstate());
  7553. If  For 0  sets : 
  7554. ( you  and | ) example ; without : 
  7555. without ) 
  7556.  
  7557. with,.all
  7558. with,you iosobj.all
  7559. with,If For0 sets:
  7560. (you and| ;without:
  7561. (you andrdstate)example;.all
  7562. with,you iosobj: For0 : you .all
  7563.  
  7564. bitwise the with int; set changes bits ios bit with ; can bits ios bit with 
  7565. clearing other leaves  ;voidiosobj:| ) example ; ORwithoutstatementwant .  ;
  7566.  
  7567. bits to with,. int changes; ios bit with bits other sets of bits  ; its state 
  7568. |)example;without: bits its state rdstate)example;; void other following colon 
  7569. : one in with ; 
  7570.  
  7571. to ios bit with clearing other leaves iosobj ;voidiosobj:| ) example ; 
  7572. ORwithoutstatementwant ;intbadbitbitclearrdstatearedefaultunchangedcurrent 
  7573. cleared equals ; void of =  of =: clear rdstate ; 
  7574. ,error iniosobjandleavesalltheothererrorstatebitsunchanged :
  7575.  
  7576. iosobj.clear(ios::colon.::colon.colon.::colon.::colon.colon.badbit|iosobj.rdstate());
  7577.  
  7578. ifstream();
  7579. ifstream(int d);
  7580. ifstream(const char* fname,
  7581.          int mode=ios&c2.in,
  7582.          int prot=filebuf&c2.openprot);
  7583. ifstream(int d, char* p, int len);
  7584.  
  7585. There are four versions of the ifstream constructor. The first version takes no 
  7586. arguments and constructs an unopened ifstream object. The second version takes 
  7587. one argument and constructs an ifstream object that is attached to the file 
  7588. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  7589. ifs. 
  7590.  
  7591. The third and fourth versions of the ifstream() constructor take three 
  7592. arguments. The third version constructs an ifstream object and opens the file 
  7593. fname with open mode equal to mode and protection mode equal to prot. The 
  7594. default value for mode is ios&c2.in, and the default value for prot is 
  7595. filebuf&c2.openprot. If the file cannot be opened, the error state of the 
  7596. constructed ifstream object is set. 
  7597.  
  7598. The fourth version constructs an ifstream object that is attached to the file 
  7599. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  7600. ifs. This constructor also sets up an associated filebuf object with a stream 
  7601. buffer that has length len bytes and begins at the position pointed to by p. If 
  7602. p is equal to 0 or len is equal to 0, the associated filebuf object is 
  7603. unbuffered. 
  7604.  
  7605. int eof() const;
  7606.  
  7607. eof() returns a nonzero value if 
  7608. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is set in the error state 
  7609. of iosobj. Otherwise, it returns 0. 
  7610. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is usually set when an 
  7611. EOF has been encountered during an extraction operation. ( set :  nonzero 0  : 
  7612. . an 
  7613.  
  7614. eof Otherwise; eofbit encountered returns during ; EOF encountered returns 
  7615. during has the setduring(. ; set : )is;when ; 
  7616.  
  7617. encountered ,. Otherwise eofbit; returns during encountered usually encountered 
  7618. usually ; state )is;: encountered state )is;; it if : value operation 
  7619.  
  7620. returns during has the set; set : 
  7621. )is;during(;Otherwiseconstduringerrorcolonintiosobjencounteredinextractionios;usuallyausuallyerror 
  7622. ; it  :valueoperation;
  7623.  
  7624. returns during has the  ,. ;  . ( set :  ) is ; when;Otherwiseconstduringerrorcolonintiosobjencounteredinextractionios;
  7625.  
  7626.  error(Otherwise a0);
  7627.  
  7628. error() eofbit iosobj usually set . of ios 0 (state int), an usually 
  7629. encountered operation iosobj colon extraction. of value usually encountered has 
  7630. encountered operation iosobj , EOF eof when during in iosobj . nonzero isit 
  7631. returns::if.::if.if.::if.::if.if.const operation set been the an iosobj 
  7632. encountered : 
  7633.  
  7634. set.error(returns::if.::if.if.::if.::if.if.constset.());
  7635. during ( of  nonzero 0  : 
  7636. (  been ) is ; : 
  7637.  
  7638. ,.an
  7639. , set.an
  7640. ,of nonzero0 :
  7641. ( been ;:
  7642. ( been)is;.an
  7643. , set: nonzero0 :  .an
  7644.  
  7645. eof Otherwise; eofbit encountered returns during 
  7646. ;EOFencounteredreturnsduringhasthe; set : )is;when during(. ; 
  7647.  
  7648. encountered ,. Otherwise eofbit; returns during encountered usually encountered 
  7649. ;state) is ; :encounteredstate) is ; ;itif:valueoperation;
  7650.  
  7651. returns during has the set ;set:) is ; when; Otherwise const during error colon 
  7652. int during ( in extraction ios ; usually a  usually a: error ; : been . : : 
  7653. been . been . anintextraction : : been . : : been . been . : : been . : : been 
  7654. . been . eofhasis duringit .ios ,ifiosobj0 . , iosobj  operation set been the 
  7655. an iosobj encountered : 
  7656.  
  7657. set.error(returns::if.::if.if.::if.::if.if.constset.());
  7658.  
  7659. ,.an
  7660. , set.an
  7661. ,of nonzero0 :
  7662. ( been)is;:
  7663. ( been)is;.an
  7664. , set: nonzero0 :  .an
  7665.  
  7666. eof Otherwise; eofbit encountered returns ; EOF encountered returns during has 
  7667. the set; set : )is;when ; 
  7668.  
  7669. encountered ,. Otherwise eofbit; returns during encountered usually encountered 
  7670. usually ( ; state )is;: encountered state )is;; it if : value operation ; 
  7671.  
  7672. returns during has the set; set : )is;when ; Otherwise const during error colon 
  7673. int iosobj encountered in extraction ios ; usually a usually a: error ; 
  7674.  
  7675. int eof() const;
  7676.  
  7677. eof() returns a nonzero value if ios::colon.::colon: : colon . : : colon . 
  7678. colon . eofbitissetintheerrorstateofiosobj .Otherwise ,itreturns0 .ios : : 
  7679. colon . : : colon . colon . : : colon . : : colon . colon . 
  7680. eofbitisusuallysetwhenanEOFhasbeenencounteredduringanextractionoperation .; 
  7681. eofbit encountered returns during ; EOF encountered returns during has the 
  7682. setduring(.; set : )is;when ; 
  7683.  
  7684. encountered  ,. Otherwise eofbit; returns during encountered usually 
  7685. encountered usually ; state )is;: encountered state )is;; it if : value 
  7686. operation 
  7687.  
  7688. returns during has the set; set : is ; during ( ; Otherwise const during error 
  7689. colon int iosobj encountered in extraction ios ; usually a usually a error;it : 
  7690. value operation ; 
  7691.  
  7692. returns during has the , .  ; .(set: )is;when ; Otherwise const during error 
  7693. colon int iosobj encountered in extraction ios ;  . ( usually a usually  :error; 0
  7694.  
  7695.  error(Otherwise a0);
  7696.  
  7697. error() eofbit iosobj usually set . of ios 0 (state int), an usually 
  7698. encountered operation iosobj colon extraction. of value usually encountered has 
  7699. encountered operation iosobj , EOF eof when during in iosobj . nonzero isit 
  7700. returns::if.::if.if.::if.::if.if.const operation set been the an iosobj 
  7701. encountered : 
  7702.  
  7703. set.error(returns::if.::if.if.::if.::if.if.constset.());
  7704. during ( of  nonzero 0  : 
  7705. (  been ) is ; : 
  7706.  
  7707. ,.an
  7708. , set.an
  7709. ,of nonzero0 :
  7710. ( been ;:
  7711. ( been)is;.an
  7712. , set: nonzero0 :  .an
  7713.  
  7714. eof Otherwise; eofbit encountered returns during 
  7715. ;EOFencounteredreturnsduringhasthe; set : )is;when during(. ; 
  7716.  
  7717. encountered ,. Otherwise eofbit; returns during encountered usually encountered 
  7718. ;state) is ; :encounteredstate) is ; ;itif:valueoperation;
  7719.  
  7720. returns during has the set ;set:) is ; when; Otherwise const during error colon 
  7721. int during ( in extraction ios ; usually a  usually a: error ; : been . : : 
  7722. been . been . anintextraction : : been . : : been . been . : : been . : : been 
  7723. . been . eofhasis duringit .ios ,ifiosobj0 . , iosobj  operation set been the 
  7724. an iosobj encountered : 
  7725.  
  7726. set.error(returns::if.::if.if.::if.::if.if.constset.());
  7727.  
  7728. ,.an
  7729. , set.an
  7730. ,of nonzero0 :
  7731. ( been)is;:
  7732. ( been)is;.an
  7733. , set: nonzero0 :  .an
  7734.  
  7735. eof Otherwise; eofbit encountered returns ; EOF encountered returns during has 
  7736. the set; set : )is;when ; 
  7737.  
  7738. encountered ,. Otherwise eofbit; returns during encountered usually encountered 
  7739. usually ( ; state )is;: encountered state )is;; it if : value operation ; 
  7740.  
  7741. returns during has the set; set : )is;when ; Otherwise const during error colon 
  7742. int iosobj encountered in extraction ios ; usually a usually a: error ; 
  7743.  
  7744. int eof() const;
  7745.  
  7746. eof() returns a nonzero value if ios::colon.::colon: : colon . : : colon . 
  7747. colon . eofbitissetintheerrorstateofiosobj .Otherwise ,itreturns0 .ios : : 
  7748. colon . : : colon . colon . : : colon . : : colon . colon . 
  7749. eofbitisusuallysetwhenanEOFhasbeenencounteredduringanextractionoperation .; 
  7750. eofbit encountered returns during ; EOF encountered returns during has the 
  7751. setduring(.; set : )is;when ; 
  7752.  
  7753. encountered  ,. Otherwise eofbit; returns during encountered usually 
  7754.  
  7755. ifstream();
  7756. ifstream(int d);
  7757. ifstream(const char* fname,
  7758.          int mode=ios&c2.in,
  7759.          int prot=filebuf&c2.openprot);
  7760. ifstream(int d, char* p, int len);
  7761.  
  7762. There are four versions of the ifstream constructor. The first version takes no 
  7763. arguments and constructs an unopened ifstream object. The second version takes 
  7764. one argument and constructs an ifstream object that is attached to the file 
  7765. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  7766. ifs. 
  7767.  
  7768. The third and fourth versions of the ifstream() constructor take three 
  7769. arguments. The third version constructs an ifstream object and opens the file 
  7770. fname with open mode equal to mode and protection mode equal to prot. The 
  7771. default value for mode is ios&c2.in, and the default value for prot is 
  7772. filebuf&c2.openprot. If the file cannot be opened, the error state of the 
  7773. constructed ifstream object is set. 
  7774.  
  7775. The fourth version constructs an ifstream object that is attached to the file 
  7776. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  7777. ifs. This constructor also sets up an associated filebuf object with a stream 
  7778. buffer that has length len bytes and begins at the position pointed to by p. If 
  7779. p is equal to 0 or len is equal to 0, the associated filebuf object is 
  7780. unbuffered. 
  7781.  
  7782. int fail() const;
  7783.  
  7784. fail() returns a nonzero value if either 
  7785. ios::colon.::colon.colon.::colon.::colon.colon.badbit or 
  7786. ios::colon.::colon.colon.::colon.::colon.colon.failbit is set in the error 
  7787. state. Otherwise, it returns 0. state it : ; 
  7788.  
  7789. error is  ;:) set ;  ;eithererrorintconstorerror ( nonzero ios Otherwise ; a 
  7790. a: int ; . colon . badbitorios : : colon . : : colon . colon . : : colon . : : 
  7791. colon . colon . failbitisset errorstate .Otherwise ,itreturns0 . , returns 
  7792. colon badbit returns fail : 
  7793.  
  7794. .int(::it.::it.it.::it..it.either.());
  7795.  ) 
  7796.  
  7797. ,.badbit
  7798. , .badbit
  7799. ,value the0 :
  7800. ( colon)set;:
  7801. ( colon)set;.badbit
  7802. , . : the0 :  .badbit
  7803.  
  7804. failbit ; in fail error  ; if fail error is ; : )set; ; 
  7805.  
  7806. fail ,. in; error fail fail :fail) set ; ;stateit:;
  7807.  
  7808. error is ; : )set;; either error int const or returns fail nonzero ios 
  7809. Otherwise ; a a: int ; 
  7810.  
  7811. or failbit() either;
  7812. returns ) failbit() a the it Otherwise::const.::const. ::const.::const.const.in 
  7813. set nonzero int value returns. , state 0. 
  7814. Otherwise::const.::const.const.::const.::const.const.in set badbit if  is colon 
  7815. fail error badbit ios . : )set;; 
  7816.  
  7817. fail  ,. in; error fail ( fail ; , . ( )set;: fail )set;; state it : 
  7818.  
  7819. error is ; , returns ) 
  7820. set;error(;eithererrorintconstorreturnsfailnonzeroiosOtherwise;aa  int ; :;
  7821.  
  7822. error is  ,. ;  . ( :  ) set ; ;eithererrorintconstorreturns
  7823.  
  7824. ,.badbit
  7825. , .badbit
  7826. ,value the0 :
  7827. ( colon)set;:
  7828. ( colon)set;.badbit
  7829. , : the0 :
  7830.  
  7831.  
  7832. ΓòÉΓòÉΓòÉ <hidden> n.colon.::colon.::colon.colon.failbit and ios::colon.::co ΓòÉΓòÉΓòÉ
  7833.  
  7834.  . badbit 
  7835.  
  7836. failbit ; in fail error ; if fail error is ; : )set;; 
  7837.  
  7838. fail ,. in; error fail fail ; )set;: fail ) set ; ;stateit:;
  7839.  
  7840. error is ; : )set;; either error int returns fail nonzero ios Otherwise ; a a: 
  7841. int ; : colon . colon . : : colon . : : colon . colon . badbitorios : : colon . 
  7842. : : colon . colon . : : colon . : : colon . colon . failbitissetintheerrorstate 
  7843. .Otherwise ,itreturns0 .; stateit:;
  7844.  
  7845. error is ; : )set; ; either error int const or error ( nonzero ios Otherwise ; 
  7846. a a: int ; error state. Otherwise, it returns 0.  ,returns colonbadbitreturnsfail:
  7847.  
  7848. .int(::it.::it.it.::it.: .it.either.());
  7849.  ) 
  7850.  
  7851. ,.badbit
  7852. , ,. .badbit
  7853. ,value the0 :
  7854. ( colon)set;:
  7855. ( colon)set;.badbit
  7856. ,  . : the0 :  .badbit
  7857.  
  7858. failbit ; in fail error  ; if fail error is ; : )set;;errorfailfail: ; 
  7859.  
  7860. error is ; : )set; ; either error int const or returns fail nonzero Otherwise ; 
  7861. a a: int ; 
  7862.  
  7863. or failbit() either;
  7864.  
  7865.  returns ) failbit() a the it 
  7866. Otherwise::const.::const. ::const.::const.const.returns  set nonzero int value 
  7867. returns. , state 0. Otherwise::const.::const.const.::const.::const.const.in set 
  7868. badbit if  . badbit 
  7869.  
  7870. failbit  ;infailerror;iffailerroriserror ( .  ; :) set ; ;
  7871.  
  7872. fail ,. in; error fail ( fail ;  , . ( )set;: fail ) set ; ;stateit:
  7873.  
  7874. error is ;  , returns )  set;error(;eithererrorintreturns fail nonzero ios 
  7875. Otherwise ; a a int;state : ; 
  7876.  
  7877. error is  ,. ; . ( :  ) set ; ;eithererrorintconstorreturnsfail Otherwise; .(a
  7878.  
  7879. ,.badbit
  7880. , .badbit
  7881. ,value the0 :
  7882. ( colon)set;:
  7883. ( colon)set;.badbit
  7884. , : the0 :   .badbit
  7885.  
  7886. failbit ; in fail error ; if fail error is ; : )set;; 
  7887.  
  7888. fail ,. in; error fail fail ; )set;: fail ) set ; ;stateit:;
  7889.  
  7890. error is ; : )set;; either error int returns fail nonzero ios Otherwise ; a a: 
  7891. int ; : colon . colon . : : colon . : : colon . colon . badbitorios : : colon . 
  7892. : : colon . colon . : : colon . : : colon . colon . failbitissetintheerrorstate 
  7893. .Otherwise ,itreturns0 .; stateit:;
  7894.  
  7895. error is ; : )set; ; either error int const or error ( nonzero ios Otherwise ; 
  7896. a a: int ; error state. Otherwise, it returns 0.  ,returns colonbadbitreturnsfail:
  7897.  
  7898. .int(::it.::it.it.::it.: .it.either.());
  7899.  ) 
  7900.  
  7901. ,.badbit
  7902. , ,. .badbit
  7903. ,value the0 :
  7904. ( colon)set;:
  7905. ( colon)set;.badbit
  7906. ,  . : the0 :  .badbit
  7907.  
  7908. failbit ; in fail error  ; if fail error is ; : )set;;errorfailfail
  7909.  
  7910. ifstream();
  7911. ifstream(int d);
  7912. ifstream(const char* fname,
  7913.          int mode=ios&c2.in,
  7914.          int prot=filebuf&c2.openprot);
  7915. ifstream(int d, char* p, int len);
  7916.  
  7917. There are four versions of the ifstream constructor. The first version takes no 
  7918. arguments and constructs an unopened ifstream object. The second version takes 
  7919. one argument and constructs an ifstream object that is attached to the file 
  7920. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  7921. ifs. 
  7922.  
  7923. The third and fourth versions of the ifstream() constructor take three 
  7924. arguments. The third version constructs an ifstream object and opens the file 
  7925. fname with open mode equal to mode and protection mode equal to prot. The 
  7926. default value for mode is ios&c2.in, and the default value for prot is 
  7927. filebuf&c2.openprot. If the file cannot be opened, the error state of the 
  7928. constructed ifstream object is set. 
  7929.  
  7930. The fourth version constructs an ifstream object that is attached to the file 
  7931. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  7932. ifs. This constructor also sets up an associated filebuf object with a stream 
  7933. buffer that has length len bytes and begins at the position pointed to by p. If 
  7934. p is equal to 0 or len is equal to 0, the associated filebuf object is 
  7935. unbuffered. 
  7936.  
  7937. void clear(int state=0);
  7938.  
  7939. clear() changes the error state of iosobj to state. If state equals 0 (its 
  7940. default), all of the bits in the error state are cleared. If you want to set 
  7941. one of the bits without clearing the other bits in the error state, you can 
  7942. bitwise OR the bit you want to set with the current error state. For example, 
  7943. the following statement sets 
  7944. ios::colon.::colon.colon.::colon.::colon.colon.badbit in iosobj and leaves all 
  7945. the other error state bits unchanged: 
  7946.  
  7947. iosobj.clear(ios::colon.::colon.colon.::colon.::colon.colon.badbit|iosobj.rdstate());
  7948.  
  7949. with,.all
  7950. with,you iosobj.all
  7951. with,If For0 sets:
  7952. (you and|)example;without:
  7953. (you andrdstate)example;.all
  7954. with,you iosobj: For0 : you  with , .intchanges ;iosbitsothersetsofbitsof;itsstate| ) example ; without :bitsitsstate )example;; void other following colon : one in with ;
  7955.  
  7956. toiosbitwithclearingotherleavesiosobj ;voidiosobj:| ) example ; ORwithoutstatementwant ;intbadbitbitclearrdstateare unchangederrorbitscurrentclearedequals;voidof=of= :clearrdstate;; otherfollowingcolon:oneinwith;
  7957.  
  7958. toiosbitwithclearingotherleavesiosobj  ; void iosobj : |)example;OR without  want; int badbit bit clear rdstate are default unchanged currentclearedequals;voidof= of= :clearrdstate; , error  in iosobj and leaves all the other error state bits unchanged:
  7959.  
  7960. iosobj.clear(ios::colon.::colon.colon.::colon.: .colon.badbit|iosobj.rdstate());
  7961.  
  7962. with,.all
  7963. with,you  ,. .all
  7964. with,If For0 sets:
  7965. (you and|)example;without:
  7966. (you andrdstate)example;.all
  7967. with,you iosobj . : For0 : you .all
  7968.  
  7969. bitwise the with 
  7970. ;setchangesbitsiosbit ;canbitsiosbitwithclearingotherleavesiosobj ;voidiosobj:| 
  7971. ) example ; ORbits other sets of bits of  and rdstate ) example ; . all 
  7972. with , you  iosobj :  For 0  :  you  . all 
  7973.  
  7974. bitwise the with int; set changes bits ios bit with can bits ios bit with 
  7975. clearing other leaves iosobj; void iosobj : |)example;OR without statement 
  7976. want; 
  7977.  
  7978. bits to with,. int changes; ios bit with bits other sets of bits of ; its state 
  7979. |)example;without: bits its state rdstate)example;; void other following colon 
  7980. : one in with ; 
  7981.  
  7982. to ios bit with clearing other leaves iosobjiosobj : |)example;OR without 
  7983. statement want; int badbit bit clear rdstate are default unchanged error bits 
  7984. current cleared equals ; void of = of =: clear rdstate ; bit ( 
  7985.  
  7986. void clear(int state=0);
  7987.  
  7988. clear() changes the error state of iosobj to state. If state equals 0 (its 
  7989. default), all of the bits in the error state are cleared. If you want to set 
  7990. one of the bits without clearing the other bits in the error state, you can 
  7991. bitwise OR error  the bit you want to set with the current error state. For 
  7992. example, the following statement sets 
  7993. ios::colon.::colon.colon.::colon.::colon.colon.badbit in iosobj and leaves all 
  7994. the other error state bits unchanged: 
  7995.  
  7996. iosobj.clear(ios::colon.::colon.colon.::colon.::colon.colon.badbit|iosobj.rdstate());
  7997.  clearing other leaves  ,. ; void  . ( iosobj :  | ) example ; 
  7998. ORwithoutstatementwant ;intbadbitbitclearrdstatearedefaultunchangederrorbits equals;void .(of=
  7999.  
  8000. with,.all
  8001. with,you iosobj.all
  8002. with,If For0 sets:
  8003. (you and|)example;without:
  8004. (you andrdstate)example;.all
  8005. with,you iosobj: For0 : you  with , .intchanges ;iosbitsothersetsofbitsof;itsstate| ) example ; without :bitsitsstate )example;; void other following colon : one in with ;
  8006.  
  8007. toiosbitwithclearingotherleavesiosobj ;voidiosobj:| ) example ; ORwithoutstatementwant ;intbadbitbitclearrdstateare unchangederrorbitscurrentclearedequals;voidof=of= :clearrdstate;; otherfollowingcolon:oneinwith;
  8008.  
  8009. toiosbitwithclearingotherleavesiosobj  ; void iosobj : |)example;OR without  want; int badbit bit clear rdstate are default unchanged
  8010.  
  8011. ifstream();
  8012. ifstream(int d);
  8013. ifstream(const char* fname,
  8014.          int mode=ios&c2.in,
  8015.          int prot=filebuf&c2.openprot);
  8016. ifstream(int d, char* p, int len);
  8017.  
  8018. There are four versions of the ifstream constructor. The first version takes no 
  8019. arguments and constructs an unopened ifstream object. The second version takes 
  8020. one argument and constructs an ifstream object that is attached to the file 
  8021. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  8022. ifs. 
  8023.  
  8024. The third and fourth versions of the ifstream() constructor take three 
  8025. arguments. The third version constructs an ifstream object and opens the file 
  8026. fname with open mode equal to mode and protection mode equal to prot. The 
  8027. default value for mode is ios&c2.in, and the default value for prot is 
  8028. filebuf&c2.openprot. If the file cannot be opened, the error state of the 
  8029. constructed ifstream object is set. 
  8030.  
  8031. The fourth version constructs an ifstream object that is attached to the file 
  8032. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  8033. ifs. This constructor also sets up an associated filebuf object with a stream 
  8034. buffer that has length len bytes and begins at the position pointed to by p. If 
  8035. p is equal to 0 or len is equal to 0, the associated filebuf object is 
  8036. unbuffered. 
  8037.  
  8038. int eof() const;
  8039.  
  8040. eof() returns a nonzero value if 
  8041. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is set in the error state 
  8042. of iosobj. Otherwise, it returns 0. 
  8043. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is usually set when an 
  8044. EOF has been encountered during an extraction operation.  been ) is ; . an 
  8045. ,  set :  nonzero 0  :   . an 
  8046.  
  8047. eof Otherwise; eofbit encountered returns during 
  8048. during(EOFencounteredreturnsduringhastheset ;set:) is ; when; 
  8049.  
  8050. encountered ,. Otherwise eofbit; returns during encountered usually encountered 
  8051. usually ; state )is;: encountered state )is;iosobj  ;itif:valueoperation;
  8052.  
  8053. returns during has the setduring ( set : )is;when ; Otherwise const during 
  8054. error colon int iosobj encountered in extraction ios ; usually a usually a: 
  8055. error ; during ( 
  8056.  
  8057.  error(Otherwise a0);
  8058.  
  8059. error() eofbit iosobj usually set . of ios 0 (state int), an usually 
  8060. encountered operation iosobj colon extraction. of value usually encountered has 
  8061. iosobj , EOF eof when during ( iosobj  during in iosobj . nonzero is, it 
  8062. returns::if.::if.if.::if.::if.if.const operation set been the an iosobj 
  8063. encountered : 
  8064.  
  8065. set.error(returns::if.::if.if.::if.::if.if.constset.());
  8066. has the  ,. ;  . ( set :  ) is ; 
  8067. when;Otherwiseconstduringerrorcolonintiosobjencountered ios; .(usuallyausually: 
  8068. error 
  8069.  
  8070. ,.an
  8071. , set.an
  8072. ,of nonzero0 :
  8073. ( been)is;:
  8074. ( been)is;.an
  8075. , set: nonzero0 :  ; EOF encountered returns during has the set; set : )is;when ;
  8076.  
  8077. encountered , .Otherwiseeofbit ;returnsduring(encounteredusuallyencounteredusually; state )is;: encountered state  ) is ; ;itif:valueoperation;
  8078.  
  8079. returnsduringhastheset ;set:) is ; when;Otherwiseconstduringerrorcolon iosobjencounteredinextractionios;usuallyausuallya :error;:been.::been.been.an int extraction::been.::been.been.::been.::been.been.eof has is eofbit nonzero during it. ios, if iosobj 0. ;  it if : value operation ;
  8080.  
  8081. returnsduringhastheset  ; set : )is;when ;Otherwiseconstduringerrorcolonint)
  8082.  
  8083. ,.an
  8084. , set.an
  8085. ,of nonzero0 :
  8086. ( been)is;:
  8087. ( been)is;.an
  8088. , set: nonzero0 :.an
  8089.  
  8090. eof Otherwise; eofbit encountered returns during ; EOF encountered returns 
  8091. during has the set; set : )is;when ; 
  8092.  
  8093. encountered ,. Otherwise eofbit; during encountered usually encountered usually 
  8094. ; state )is;: encountered state )is;; it if : value operation ; 
  8095.  
  8096. returns during has the set ;set:) is ; 
  8097. when;Otherwiseconstduringerrorcolonintiosobjencounteredinextractionios;usuallyausuallya :error;.
  8098.  
  8099. int eof()
  8100.  
  8101. eof() returns a nonzero value if 
  8102. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is set in the error state 
  8103. of iosobj. Otherwise, it returns 0. 
  8104. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is usually set when an 
  8105. EOF has been encountered during an extraction operation. 
  8106.   ) is ; . an 
  8107. ,  set :  nonzero 0  :   . an 
  8108.  
  8109. eof Otherwise; eofbit encountered returns during 
  8110. during(EOFencounteredreturnsduringhastheset ;set:) is ; when ;
  8111.  
  8112. encountered ,. Otherwise eofbit; returns during encountered usually encountered 
  8113. usually ; state )is;: encountered state )is; iosobj ; it if : value operation ; 
  8114.  
  8115. returns during has the setduring ( set : )is;when ; Otherwise const during 
  8116. error colon int iosobj encountered in extraction ios ; usually a . ( usually a: 
  8117. error ; during ( 
  8118.  
  8119.  error(Otherwise a0);
  8120.  
  8121. error() eofbit iosobj usually set . of ios 0 (state int), an usually 
  8122. encountered operation iosobj colon extraction. of value usually encountered has 
  8123. iosobj , EOF eof ) when during ( iosobj  during in iosobj . nonzero is, it 
  8124. returns::if.::if.if.::if.::if.if.const operation set been the an iosobj 
  8125. encountered : 
  8126.  
  8127. set.error(returns::if.::if.if.::if.::if.if.constset.());
  8128.  has the , .  ; .(set: )is;when ; Otherwise const during error colon int iosobj 
  8129. encountered  ios ;  . ( usually a usually  :error  0
  8130.  
  8131. ,.an
  8132. , set.an
  8133. ,of nonzero0 :
  8134. ( been)is;:
  8135. ( been)is;.an
  8136. , set: nonzero0 :  ; EOF encountered returns during has the set; set : )is;when ;
  8137.  
  8138. encountered , .Otherwiseeofbit ;returnsduring(encounteredusuallyencounteredusually; state )is;: encountered state  ) is ; ;itif:valueoperation;
  8139.  
  8140. returnsduringhastheset ;set:) is ; when;Otherwiseconstduringerrorcolon iosobjencounteredinextractionios;usuallyausuallya :error;:been.::been.been.an int extraction::been.::been.been.::been.::been.been.eof has is eofbit nonzero during it. ios, if iosobj 0. ;  it if : value operation ;
  8141.  
  8142. returnsduringhastheset  ; set : )is;when ;Otherwiseconstduringerrorcolonint)
  8143.  
  8144. ,.an
  8145. , set.an
  8146. ,of nonzero0 :
  8147. ( been)is;:
  8148. ( been)is;.an
  8149. , set: nonzero0 :.an
  8150.  
  8151. eof Otherwise; eofbit encountered returns during ; EOF encountered returns 
  8152. during has the set; set : )is;when ; 
  8153.  
  8154. encountered ,. Otherwise eofbit; during encountered usually encountered usually 
  8155. ; state )is;: encountered state )is;; it if : value operation ; 
  8156.  
  8157. returns during has the set ;set:) is ; 
  8158. when;Otherwiseconstduringerrorcolonintiosobjencounteredinextractionios;usuallyausuallya :error;.
  8159.  
  8160. int eof()
  8161.  
  8162. eof() returns a nonzero value if 
  8163. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is set in the error state 
  8164. of iosobj. Otherwise, it returns 0. 
  8165. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is usually set when an 
  8166. EOF has been encountered during an extraction operation. 
  8167.   ) is ; . an 
  8168. ,  set :  nonzero 0  :   . an 
  8169.  
  8170. eof Otherwise; eofbit encountered returns during 
  8171. during(EOFencounteredreturnsduringhastheset ;set:) is ; when
  8172.  
  8173. ifstream();
  8174. ifstream(int d);
  8175. ifstream(const char* fname,
  8176.          int mode=ios&c2.in,
  8177.          int prot=filebuf&c2.openprot);
  8178. ifstream(int d, char* p, int len);
  8179.  
  8180. There are four versions of the ifstream constructor. The first version takes no 
  8181. arguments and constructs an unopened ifstream object. The second version takes 
  8182. one argument and constructs an ifstream object that is attached to the file 
  8183. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  8184. ifs. 
  8185.  
  8186. The third and fourth versions of the ifstream() constructor take three 
  8187. arguments. The third version constructs an ifstream object and opens the file 
  8188. fname with open mode equal to mode and protection mode equal to prot. The 
  8189. default value for mode is ios&c2.in, and the default value for prot is 
  8190. filebuf&c2.openprot. If the file cannot be opened, the error state of the 
  8191. constructed ifstream object is set. 
  8192.  
  8193. The fourth version constructs an ifstream object that is attached to the file 
  8194. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  8195. ifs. This constructor also sets up an associated filebuf object with a stream 
  8196. buffer that has length len bytes and begins at the position pointed to by p. If 
  8197. p is equal to 0 or len is equal to 0, the associated filebuf object is 
  8198. unbuffered. 
  8199.  
  8200. int fail() const;
  8201.  
  8202. fail() returns a nonzero value if either 
  8203. ios::colon.::colon.colon.::colon.::colon.colon.badbit or 
  8204. ios::colon.::colon.colon.::colon.::colon.colon.failbit is set in the error 
  8205. state. Otherwise, it returns 0. returns fail  Otherwise ;  . ( a 
  8206. :int  0 ,returns)0 badbit;colon; it  0 in a : badbit 
  8207.  
  8208. ,.badbit
  8209. , .badbit
  8210. ,value the0 :
  8211. ( colon)set;:
  8212. ( colon)set;.badbit
  8213. , : the0 :   .badbit
  8214.  
  8215. failbit ; in fail error  ;iffailerroris;:) set ; ;
  8216.  
  8217. fail ,. in; error ( fail fail  ;) set ; :fail) set ; ;stateit:;
  8218.  
  8219. error is ; : )set; ; either error int returns fail nonzero ios Otherwise ; a a: 
  8220. int ; : colon . colon  : colon . : : colon . colon . badbitorios : : colon . : 
  8221. : colon . colon . : : colon . : : colon . colon . failbitissetintheerrorstate 
  8222. .Otherwise ,itreturns0 .; stateit:;
  8223.  
  8224. error is ; : )set; ; either error int const or ) 
  8225.  
  8226. ,.badbit
  8227. , .badbit
  8228. ,value the0 : colon)set;:
  8229. ( colon)set;.badbit
  8230. , : the0 :  .badbit
  8231.  
  8232. failbit ; in fail error ; if fail is ; : )set;; 
  8233.  
  8234. fail ,. in;  error fail fail ; )set;: fail )set;; state it : ; 
  8235.  
  8236. error a a: int ; . 
  8237.  
  8238. or failbit() either
  8239.  
  8240. failbit() a the it Otherwise::const.::const.const.::const.::const.const.in set 
  8241. nonzero int value returns. 0. 
  8242. Otherwise::const.::const.const.::const.::const.const.in set badbit if is colon 
  8243. fail error badbit ios . 
  8244.    ) set ; . badbit 
  8245. ,  :  the 0  :    . badbit 
  8246.  
  8247. failbit ; in fail error error(iffailerroris;:) set ;  )
  8248.  
  8249. ,.badbit
  8250. ,
  8251.  
  8252.  
  8253. ΓòÉΓòÉΓòÉ <hidden> n.colon.::colon.::colon.colon.failbit and ios::colon.::co ΓòÉΓòÉΓòÉ
  8254.  
  8255. . ( . badbit 
  8256. , value  the 0  : 
  8257. (  colon ) set ; : 
  8258. (  colon ) set ; . badbit 
  8259. ,  :  the 0  :   . badbit 
  8260.  
  8261. failbit ; in fail error ; if fail error is ; : )set;; 
  8262.  
  8263. fail ,. in; error fail fail ; )set;: fail )set;; it : ; 
  8264.  
  8265. error is ; : )set;; either error int const or nonzero ios Otherwise ; a a: int 
  8266. ; : 
  8267.  
  8268. int fail() const;
  8269.  
  8270. fail() returns a nonzero value if either ios::colon.::colon.colon.::colon.::. 
  8271. badbitorios : : colon . : : colon . colon . : : colon . : : colon . colon . 
  8272. failbitissetintheerrorstate .Otherwise ,itreturns0 .or returnsfail Otherwise; .(a
  8273.  
  8274. ,.badbit
  8275. , .badbit
  8276. ,value the0 :
  8277. ( colon)set;:
  8278. ( colon)set;.badbit
  8279. , : the0 :   .badbit
  8280.  
  8281. failbit ; in fail error  ;iffailerroris;:) set ; ;
  8282.  
  8283. fail ,. in; error ( fail fail  ;) set ; :fail) set ; ;stateit:;
  8284.  
  8285. error is ; : )set; ; either error int returns fail nonzero ios Otherwise ; a a: 
  8286. int ; : colon . colon  : colon . : : colon . colon . badbitorios : : colon . : 
  8287. : colon . colon . : : colon . : : colon . colon . failbitissetintheerrorstate 
  8288. .Otherwise ,itreturns0 .; stateit:;
  8289.  
  8290. error is ; : )set; ; either error int const or ) 
  8291.  
  8292. ,.badbit
  8293. , .badbit
  8294. ,value the0 : colon)set;:
  8295. ( colon)set;.badbit
  8296. , : the0 :  .badbit
  8297.  
  8298. failbit ; in fail error ; if fail is ; : )set;; 
  8299.  
  8300. fail ,. in;  error fail fail ; )set;: fail )set;; state it : ; 
  8301.  
  8302. error a a: int ; . 
  8303.  
  8304. or failbit() either
  8305.  
  8306. failbit() a the it Otherwise::const.::const.const.::const.::const.const.in set 
  8307. nonzero int value returns. 0. 
  8308. Otherwise::const.::const.const.::const.::const.const.in set badbit if is colon 
  8309. fail error badbit ios . 
  8310.    ) set ; . badbit 
  8311. ,  :  the 0  :    . badbit 
  8312.  
  8313. failbit ; in fail error error(iffailerroris;:) set ;  )
  8314.  
  8315. ,.badbit
  8316. ,.(.badbit
  8317. ,value the0 :
  8318. ( colon)set;:
  8319. ( colon)set;.badbit
  8320. , : the0 :  .badbit
  8321.  
  8322. failbit ; in fail error ; if fail error is ; : )set;; 
  8323.  
  8324. fail ,. in; error fail fail ; )set;: fail )set;; it : ; 
  8325.  
  8326. error is ; : )set;; either error int const or nonzero ios Otherwise ; a a: int 
  8327. ; : 
  8328.  
  8329. int fail() const;
  8330.  
  8331. fail() returns a nonzero value if either ios::colon.::colon.colon.::colon.::. 
  8332. badbitorios : : colon . : : colon . colon . : : colon . : : colon . colon . 
  8333. failbitissetintheerrorstate .Otherwise ,itreturns0 .or returnsfail Otherwise; .(a
  8334.  
  8335. ,.badbit
  8336. , .badbit
  8337. ,value the0 :
  8338. ( colon)set;:
  8339. ( colon)set;.badbit
  8340. , : the0 :   .badbit
  8341.  
  8342. failbit ; in fail error  ;iffailerroris;:) set ; ;
  8343.  
  8344. fail ,. in; error ( fail fail  ;) set ; :fail) set ; ;stateit:;
  8345.  
  8346. error is ; : )set; ; either error int returns fail nonzero ios Otherwise ; a a: 
  8347. int ; 
  8348.  
  8349. ifstream();
  8350. ifstream(int d);
  8351. ifstream(const char* fname,
  8352.          int mode=ios&c2.in,
  8353.          int prot=filebuf&c2.openprot);
  8354. ifstream(int d, char* p, int len);
  8355.  
  8356. There are four versions of the ifstream constructor. The first version takes no 
  8357. arguments and constructs an unopened ifstream object. The second version takes 
  8358. one argument and constructs an ifstream object that is attached to the file 
  8359. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  8360. ifs. 
  8361.  
  8362. The third and fourth versions of the ifstream() constructor take three 
  8363. arguments. The third version constructs an ifstream object and opens the file 
  8364. fname with open mode equal to mode and protection mode equal to prot. The 
  8365. default value for mode is ios&c2.in, and the default value for prot is 
  8366. filebuf&c2.openprot. If the file cannot be opened, the error state of the 
  8367. constructed ifstream object is set. 
  8368.  
  8369. The fourth version constructs an ifstream object that is attached to the file 
  8370. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  8371. ifs. This constructor also sets up an associated filebuf object with a stream 
  8372. buffer that has length len bytes and begins at the position pointed to by p. If 
  8373. p is equal to 0 or len is equal to 0, the associated filebuf object is 
  8374. unbuffered. 
  8375.  
  8376. void clear(int state=0);
  8377.  
  8378. clear() changes the error state of iosobj to state. If state equals 0 (its 
  8379. default), all of the bits in the error state are cleared. If you want to set 
  8380. one of the bits without clearing the other bits in the error state, you can 
  8381. bitwise OR the bit you want to set with the current error state. For example, 
  8382. the following statement sets 
  8383. ios::colon.::colon.colon.::colon.::colon.colon.badbit in iosobj and leaves all 
  8384. the other error state bits unchanged: 
  8385.  
  8386. iosobj.clear(ios::colon.::colon.colon.::colon.::colon.colon.badbit|iosobj.rdstate());
  8387. clear its If error. int ios 0. equals::are.::are.are.::are.::are.are.changes 
  8388. example of iosobj OR all can clearing and bits bit all cleared in. 
  8389.    ) example ; . all 
  8390. with , you  iosobj :  For 0  :  you    . ( iosobj  . all 
  8391. with , If  For 0  sets : 
  8392. ( you  and | ) example ; without : 
  8393. ( you  and rdstate ) example ; . all 
  8394. with , you  iosobj :  For 0  :  you  . all 
  8395.  
  8396. bitwise the  with int; set changes bits ios bit with ; can bits ios bit with 
  8397. clearing other leaves iosobj; void iosobj : |)example;OR without statement 
  8398. want; 
  8399.  
  8400. bits to with,.  changes; ios bit with bits other sets of , . ( bits of ; its 
  8401. state |)example;without: bits its state rdstate)example;; void  colon : one in 
  8402. with ; 
  8403.  
  8404. to ios bit with clearing other leaves iosobj; void iosobj : |)example;OR 
  8405. without statement want; int badbit bit clear rdstate are default unchanged 
  8406. current cleared equals ; void of = of =: clear rdstate 
  8407.  
  8408. with,.all
  8409. with,you iosobj.all
  8410. with,If For0 sets:
  8411. (you and|)example;without:
  8412. (you andrdstate)example;.all
  8413. with,you iosobj: For0 : you  with , .intchanges ;iosbitsothersetsofbitsof ; its state |)example;without: bits its state  ) example ; ;voidotherfollowingcolon:oneinwith;
  8414.  
  8415. toiosbitwithclearingotherleavesiosobj ;voidiosobj:| ) example ; ORwithout want ;intbadbitbitclearrdstateare unchangederrorbitscurrentclearedequals;voidof=of= :clearrdstate; andrdstate)example;.all
  8416. with,you iosobj: For0 : you .all
  8417.  
  8418. bitwise the with int; set changes bits ios bit with ; can bits ios bit with 
  8419. clearing other leaves iosobj; void iosobj :| ) example ; ORwithoutstatementwant ;
  8420.  
  8421. bits to with,. int changes; ios bit with bits other sets of bits of ; its state 
  8422. |)example;without: bits its state rdstate)example;; void other following colon 
  8423. : one in with ; 
  8424.  
  8425. to ios bit with clearing other leaves iosobj; void iosobj : |)example;OR 
  8426. without statement , . 
  8427. ;intbadbitbitclearrdstatearedefaultunchangederrorbitscurrentclearedequals;voidof=of= :clearrdstate;,bit(
  8428.  
  8429. void clear(int state=0);
  8430.  
  8431. clear() changes the error state of iosobj to state. If state equals 0 (its 
  8432. default), all of the bits in the error state are cleared. If you want to set 
  8433. one of the bits without clearing the other bits in the error state, you can 
  8434. bitwise OR the bit you want to set with the current error state. For example, 
  8435. the following statement sets ios::colon.::colon.colon.:. : : colon . colon . 
  8436. badbitiniosobjandleavesalltheothererrorstatebitsunchanged :
  8437.  
  8438. iosobj.clear(ios::colon.::colon.colon.::colon.::colon.colon.badbit|iosobj.rdstate());
  8439. bit ( clear its If error. int ios 0. 
  8440. equals::are.::are.are.::are.::are.are.changes example of iosobj OR all can 
  8441. clearing and bits bit all cleared in. 
  8442.    ) example ; . all 
  8443. with , you  iosobj :  For 0  :  you  can bits ios bit with clearing other 
  8444. leaves iosobj; void iosobj : |)example;OR  without statement without ) 
  8445.  
  8446. with,.all
  8447. with,you  .(iosobjsets:
  8448. (you and|)example;without:
  8449. (you andrdstate)example;.all
  8450. with,you iosobj: For0 : you .all
  8451.  
  8452. bitwise the  with int; set changes bits ios bit with ; can bits ios bit with 
  8453. clearing other leaves iosobj; void iosobj : |)example;OR without statement 
  8454. want; 
  8455.  
  8456. bits to with,.  changes; ios bit with bits other sets of bit ( , . ( bits of ; 
  8457. its state |)example;without: bits its state rdstate)example;; void  colon : one 
  8458. in with ; 
  8459.  
  8460. to ios bit with clearing other leaves iosobj; void iosobj : |)example;OR 
  8461. without statement ( want; int badbit bit clear rdstate are default unchanged 
  8462. current cleared equals ; void of = of =: clear rdstate  ;:
  8463.  
  8464. clear bits() are;
  8465.  
  8466. bits() error = current If can badbit cleared::and.::and.and.::and.::and .all 
  8467. default cleared::and.::and.and.::and.::and.and.bitwise clearing example changes 
  8468. For bit following. equals, colon error 0. default  error bits  equals ; void  . 
  8469. ( of = 
  8470.  
  8471. ifstream();
  8472. ifstream(int d);
  8473. ifstream(const char* fname,
  8474.          int mode=ios&c2.in,
  8475.          int prot=filebuf&c2.openprot);
  8476. ifstream(int d, char* p, int len);
  8477.  
  8478. There are four versions of the ifstream constructor. The first version takes no 
  8479. arguments and constructs an unopened ifstream object. The second version takes 
  8480. one argument and constructs an ifstream object that is attached to the file 
  8481. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  8482. ifs. 
  8483.  
  8484. The third and fourth versions of the ifstream() constructor take three 
  8485. arguments. The third version constructs an ifstream object and opens the file 
  8486. fname with open mode equal to mode and protection mode equal to prot. The 
  8487. default value for mode is ios&c2.in, and the default value for prot is 
  8488. filebuf&c2.openprot. If the file cannot be opened, the error state of the 
  8489. constructed ifstream object is set. 
  8490.  
  8491. The fourth version constructs an ifstream object that is attached to the file 
  8492. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  8493. ifs. This constructor also sets up an associated filebuf object with a stream 
  8494. buffer that has length len bytes and begins at the position pointed to by p. If 
  8495. p is equal to 0 or len is equal to 0, the associated filebuf object is 
  8496. unbuffered. 
  8497.  
  8498. int eof() const;
  8499.  
  8500. eof() returns a nonzero value if 
  8501. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is set in the error state 
  8502. of iosobj. Otherwise, it returns 0. 
  8503. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is usually set when an 
  8504. EOF has been encountered during an extraction operation. .  :   . an 
  8505.  
  8506. eof Otherwise; eofbit encountered returns during ; EOF encountered returns 
  8507. during has the set; set during ( :) is ; when;
  8508.  
  8509. encountered ,. Otherwise 
  8510. ;returnsduringencounteredusuallyencounteredusually;state) is ; 
  8511. :encounteredstate) is ; ;itif:valueoperation;
  8512.  
  8513. returns during has the ( set; set : )is;when during(,. ; Otherwise const during 
  8514. error colon int iosobj encountered in extraction ios ; usually a usually a: 
  8515. error ; , during ( 
  8516.  
  8517. (Otherwise a0);
  8518.  
  8519. error() eofbit iosobj usually set . of ios 0 (state int), an usually 
  8520. encountered operation iosobj colon extraction. of value usually encountered has 
  8521. encountered operation iosobj , EOF eof when during in iosobj . nonzero is, it ) 
  8522. returns::if.::if.if.:during(.::if.if.const operation set been the an iosobj 
  8523. encountered : 
  8524.  
  8525. set.error(returns::if.::if.if.::if.::if.if.constset.());
  8526. during ( error state of iosobj. Otherwise returns 0. ios::colon.::colon.colon.. 
  8527. : : colon . colon . 
  8528. eofbitisusuallysetwhenanEOFhasbeenencounteredduringanextractionoperation .
  8529.    ) is ; . an 
  8530. ,  set :  nonzero 0  :   set; set : )is;when  ) 
  8531.  
  8532. ,.an
  8533. ,  .(set:
  8534. ( been)is;:
  8535. ( been)is;.an
  8536. , set: nonzero,.(:  .an
  8537.  
  8538. eof  Otherwise; eofbit encountered returns during ; EOF encountered returns 
  8539. during has the set; set : )is;when ; 
  8540.  
  8541. encountered ,.  eofbit; returns during encountered usually during ( , . ( 
  8542. encountered usually ; state )is;: encountered state )is;;  if : value operation 
  8543.  
  8544. returns during the set; set : )is;when const during error colon int  in 
  8545. extraction ios ; usually a usually a: error  ;
  8546.  
  8547. error encountered() colon;
  8548.  
  8549. encountered() iosobj a in of EOF const 
  8550. extraction::been.::been.been.::been.::been .an int 
  8551. extraction::been.::been.been.::been.::been.been.eof has is eofbit nonzero 
  8552. during it. ios, if iosobj 0. int  iosobj encountered  ios 
  8553.  
  8554. ,.an
  8555. , set.an
  8556. ,of nonzero0 :
  8557. ( been)is;:
  8558. ( been)is;.an
  8559. , set: nonzero0 :  .an
  8560.  
  8561. eof Otherwise; eofbit encountered returns during 
  8562. ;EOFencounteredreturnsduringhastheset ;set:) is ; when;
  8563.  
  8564. encountered ,. Otherwise eofbit; returns during encountered usually encountered 
  8565. usually ;state) is ; :encounteredstate) is ; ;itif:valueoperation;
  8566.  
  8567. returns during has the set; set : )is;when ; Otherwise const during error colon 
  8568. int iosobj encountered in extraction ios ; usually a usually a: error ; colon . 
  8569. : : colon . colon . eofbitissetintheerrorstateofiosobj .Otherwise ,itreturns0 
  8570. .ios : : colon . : : colon . colon . : : colon . : : colon . colon . 
  8571. eofbitisusuallysetwhenanEOFhasbeenencounteredduringanextractionoperation . . :  .an
  8572.  
  8573. eof Otherwise; eofbit encountered returns during ; EOF encountered returns 
  8574. during has the set; set during ( :) is ; when;
  8575.  
  8576. encountered ,. Otherwise  ;returnsduringencounteredusuallyencounteredusually; 
  8577. state )is;: encountered state )is;; it if : value operation ; 
  8578.  
  8579. returns during has the during ( , . 
  8580. ;Otherwiseconstduringerrorcolonintiosobjencounteredinextractionios;usuallyausuallya :error;,during(
  8581.  
  8582.  (Otherwise a0);
  8583.  
  8584. error() eofbit iosobj usually set ( . of ios 0 (state int), an usually 
  8585. encountered operation iosobj colon extraction. of value usually encountered has 
  8586. encountered operation iosobj , EOF eof when during in iosobj . nonzero is, it ) 
  8587. colon set . error ( returns : : if . : : if . if . : : if . : : if . if . const 
  8588. set . ( ) ) ; 
  8589. during ( error state of iosobj. Otherwise returns 0. 
  8590. ios::colon.::colon.colon.: .::colon.colon.eofbit is usually set when an EOF has 
  8591. been encountered during an extraction operation. 
  8592.   ) is ; . an 
  8593. ,  set :  nonzero 0  : 
  8594.  
  8595. ,.an
  8596. ,  .(set:
  8597. ( been)is;:
  8598. ( been)is;.an
  8599. , set: nonzero0 ,.(:  .an
  8600.  
  8601. eof  Otherwise; eofbit encountered returns during 
  8602. ;EOFencounteredreturnsduringhastheset ;set:) is ; when;
  8603.  
  8604. encountered ,. ;state) is ; :encounteredstate) is ; ; if:valueoperation;
  8605.  
  8606. returns during  the set; set : )is;when const during error colon int  in 
  8607. extraction ios ; usually a usually a: error  ;:
  8608.  
  8609. error encountered() colon;
  8610.  
  8611. encountered() iosobj a in of EOF const extraction::been.::been.: been . : : 
  8612. been  . anintextraction : : been . : : been . been . : : been . : : been . been 
  8613. . eofhasiseofbitnonzeroduringit .ios ,ifiosobj0 
  8614. .int iosobjencountered ios  .(usuallyausually: error   0 
  8615.  
  8616. ,.an
  8617. , set.an
  8618. ,of nonzero0 :
  8619. ( been)is;:
  8620. ( been)is;.an
  8621. , set: nonzero0 :  .an
  8622.  
  8623. eof Otherwise; eofbit encountered returns during 
  8624. ;EOFencounteredreturnsduringhastheset ;set:) is ; when;
  8625.  
  8626. encountered ,. Otherwise eofbit; returns during encountered usually encountered 
  8627. usually ;state) is ; :encounteredstate) is ; ;itif:valueoperation;
  8628.  
  8629. returns during has the set; set : )is;when ; Otherwise const during error colon 
  8630. int iosobj encountered in extraction ios ; usually a usually a: error ; colon . 
  8631. : : colon . colon . eofbitissetintheerrorstateofiosobj .Otherwise ,itreturns0 
  8632. .ios : : colon . : : colon . colon . : : colon . : : colon . colon . 
  8633. eofbitisusuallysetwhenanEOFhasbeenencounteredduringanextractionoperation . . :  .an
  8634.  
  8635. eof Otherwise; eofbit encountered returns during ; EOF encountered returns 
  8636. during has the set; set during ( :) is ; when;
  8637.  
  8638. encountered ,. Otherwise  ;returnsduringencounteredusuallyencounteredusually
  8639.  
  8640. ifstream();
  8641. ifstream(int d);
  8642. ifstream(const char* fname,
  8643.          int mode=ios&c2.in,
  8644.          int prot=filebuf&c2.openprot);
  8645. ifstream(int d, char* p, int len);
  8646.  
  8647. There are four versions of the ifstream constructor. The first version takes no 
  8648. arguments and constructs an unopened ifstream object. The second version takes 
  8649. one argument and constructs an ifstream object that is attached to the file 
  8650. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  8651. ifs. 
  8652.  
  8653. The third and fourth versions of the ifstream() constructor take three 
  8654. arguments. The third version constructs an ifstream object and opens the file 
  8655. fname with open mode equal to mode and protection mode equal to prot. The 
  8656. default value for mode is ios&c2.in, and the default value for prot is 
  8657. filebuf&c2.openprot. If the file cannot be opened, the error state of the 
  8658. constructed ifstream object is set. 
  8659.  
  8660. The fourth version constructs an ifstream object that is attached to the file 
  8661. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  8662. ifs. This constructor also sets up an associated filebuf object with a stream 
  8663. buffer that has length len bytes and begins at the position pointed to by p. If 
  8664. p is equal to 0 or len is equal to 0, the associated filebuf object is 
  8665. unbuffered. 
  8666.  
  8667. int fail() const;
  8668.  
  8669. fail() returns a nonzero value if either 
  8670. ios::colon.::colon.colon.::colon.::colon.colon.badbit or 
  8671. ios::colon.::colon.colon.::colon.::colon.colon.failbit is set in the error 
  8672. state. Otherwise, it returns 0. in fail error error(iffailerroris;:) set ; 
  8673.  
  8674. ,.badbit
  8675. ,  .(. :
  8676. ( colon)set;:
  8677. ( colon)set;.badbit
  8678. , : the0 ,.(:  .badbit
  8679.  
  8680. failbit  ; in fail error  ;if fail error is ; : )set;; 
  8681.  
  8682. fail ,. .  error ( , . ( fail  ;) set ; :fail) set ; ; it:;
  8683.  
  8684.  ; : )set; either error int const or  nonzero ios Otherwise ; a a: int  ;:
  8685.  
  8686. int fail() const;
  8687.  
  8688. fail() returns a nonzero value if either 
  8689. ios::colon.::colon.colon :colon.::colon .badbit or ios::colon.::colon: : colon 
  8690. . : : colon . colon . failbitissetintheerrorstate .Otherwise ,itreturns0 
  8691. .or returnsfail Otherwise  .(a: int   0 
  8692.  
  8693. ,.badbit
  8694. , .badbit
  8695. ,value the0 :
  8696. ( colon)set;:
  8697. ( colon)set;.badbit
  8698. , : the0 :   .badbit
  8699.  
  8700. failbit ; in fail error  ;iffailerroris;:) set ; ;
  8701.  
  8702. fail ,. in; error fail fail  ;) set ; :fail) set ; ;stateit:;
  8703.  
  8704. error is ; : )set; ; either error int returns fail nonzero ios Otherwise ; a a: 
  8705. int ; const . const .  const . : : const . const . insetnonzerointvaluereturns 
  8706. .,state0 .Otherwise : : const . : : const . const . : : const . : : const . 
  8707. const . insetbadbitifiscolonfailerrorbadbitios. . :   . badbit 
  8708.  
  8709. failbit ; in fail error ;  if fail error is ; error ( :) set ; ;
  8710.  
  8711. fail ,.  ;errorfailfail) 
  8712.  
  8713. ,.badbit
  8714. , .badbit
  8715. ,value the0 :
  8716. (
  8717.  
  8718.  
  8719. ΓòÉΓòÉΓòÉ <hidden> n.colon.::colon.::colon.colon.failbit and ios::colon.::co ΓòÉΓòÉΓòÉ
  8720.  
  8721. .  colon ) set ; : 
  8722. (  colon ) set ; . badbit 
  8723. ,  :  the 0  :   . badbit 
  8724.  
  8725. failbit ; in fail error ; if fail error is ; : )set;; 
  8726.  
  8727. fail ,. in; error fail .  fail ; )set;: fail )set;; state it : ; 
  8728.  
  8729. error is ;:) set ; ;eithererrorintconstorreturnsfailnonzeroiosOtherwise;aa: int 
  8730. ; : 
  8731.  
  8732. int fail() const;
  8733.  
  8734. fail() returns a nonzero value if either 
  8735. ios::colon.::colon.colon.::colon.::colon.colon.badbit or 
  8736. ios::colon.::colon.colon.::colon.::colon.colon.returns  is set in the error 
  8737. state. Otherwise, it returns 0.  in fail error error(iffailerroris;:) set ; 
  8738.  
  8739. ,.badbit
  8740. ,.( . :
  8741. ( colon)set;:
  8742. ( colon)set;.badbit
  8743. , : the0 ,.(:  .badbit
  8744.  
  8745. failbit ; in fail error  ; iffailerroris;:) set ; ;
  8746.  
  8747. fail ,. in; error fail  .  error ( , . ( fail  ;) set ; :fail) set ; ;it : ; 
  8748.  
  8749.   ; : )set; either error int const or nonzero ios Otherwise ; a a: int  ;:
  8750.  
  8751. int fail() const;
  8752.  
  8753. fail() returns a nonzero value if either ios::colon.::colon.colon :colon.::. 
  8754. badbitorios : : colon . : : colon .  : : colon . : : colon . colon . 
  8755. failbitissetintheerrorstate .Otherwise ,itreturns0 .or returnsfail Otherwise  .(a
  8756.  
  8757. ,.badbit
  8758. , .badbit
  8759. ,value the0 :
  8760. ( colon)set;:
  8761. ( colon)set;.badbit
  8762. , : the0 :   .badbit
  8763.  
  8764. failbit ; in fail error  ;iffailerroris;:) set ; ;
  8765.  
  8766. fail ,. in; error fail fail  ;) set ; :fail) set ; ;stateit:;
  8767.  
  8768. error is ; : )set; ; either error int returns fail nonzero ios Otherwise ; a a: 
  8769. int ; const . const .  const . : : const . const . insetnonzerointvaluereturns 
  8770. .,state0 .Otherwise : : const . : : const . const . : : const . : : const . 
  8771. const . insetbadbitifiscolonfailerrorbadbitios. . :   . badbit 
  8772.  
  8773. failbit ; in fail error ;  if fail error is ; error ( :) set ; ;
  8774.  
  8775. fail ,.  ;errorfailfail) 
  8776.  
  8777. ,.badbit
  8778. , .badbit
  8779. ,value the0 :
  8780. ( . colon)set;:
  8781. ( colon)set;.badbit
  8782. , : the0 :  .badbit
  8783.  
  8784. failbit ; in fail error ; if fail error is ; : )set;; 
  8785.  
  8786. fail ,. in; error fail .  fail ; )set;: fail )set;; state it : ; 
  8787.  
  8788. error is ;:) set ; ;eithererrorintconstorreturnsfailnonzeroiosOtherwise;aa: int 
  8789. ; : 
  8790.  
  8791. int fail() const;
  8792.  
  8793. fail() returns a nonzero value if either 
  8794. ios::colon.::colon.colon.::colon.::colon.colon.badbit or 
  8795. ios::colon.::colon.colon.::colon.::colon.colon.returns  is set in the error 
  8796. state. Otherwise, it returns 0.  in fail error error(iffailerroris;:) set ; 
  8797.  
  8798. ,.badbit
  8799. ,.( . :
  8800. ( colon)set;:
  8801. ( colon)set;.badbit
  8802. , : the0 ,.(:  .badbit
  8803.  
  8804. failbit ; in fail error  ; iffailerroris;:) set ; ;
  8805.  
  8806. fail ,. in; error fail  .  error ( , . ( fail  ;) set ; :fail) set ; ;it : ; 
  8807.  
  8808.   ; : )set; either error int const or nonzero ios Otherwise ; a a: int  ;:
  8809.  
  8810. int fail() const;
  8811.  
  8812. fail() returns a nonzero value if either ios::colon.::colon.colon :colon.::
  8813.  
  8814. ifstream();
  8815. ifstream(int d);
  8816. ifstream(const char* fname,
  8817.          int mode=ios&c2.in,
  8818.          int prot=filebuf&c2.openprot);
  8819. ifstream(int d, char* p, int len);
  8820.  
  8821. There are four versions of the ifstream constructor. The first version takes no 
  8822. arguments and constructs an unopened ifstream object. The second version takes 
  8823. one argument and constructs an ifstream object that is attached to the file 
  8824. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  8825. ifs. 
  8826.  
  8827. The third and fourth versions of the ifstream() constructor take three 
  8828. arguments. The third version constructs an ifstream object and opens the file 
  8829. fname with open mode equal to mode and protection mode equal to prot. The 
  8830. default value for mode is ios&c2.in, and the default value for prot is 
  8831. filebuf&c2.openprot. If the file cannot be opened, the error state of the 
  8832. constructed ifstream object is set. 
  8833.  
  8834. The fourth version constructs an ifstream object that is attached to the file 
  8835. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  8836. ifs. This constructor also sets up an associated filebuf object with a stream 
  8837. buffer that has length len bytes and begins at the position pointed to by p. If 
  8838. p is equal to 0 or len is equal to 0, the associated filebuf object is 
  8839. unbuffered. 
  8840.  
  8841. void clear(int state=0);
  8842.  
  8843. clear() changes the error state of iosobj to state. If state equals 0 (its 
  8844. default), all of the bits in the error state are cleared. If you want to set 
  8845. one of the bits without clearing the other bits in the error state, you can 
  8846. bitwise OR the bit you want to set with the current error state. For example, 
  8847. the following statement sets 
  8848. ios::colon.::colon.colon.::colon.::colon.colon.badbit in iosobj and leaves all 
  8849. the other error state bits unchanged: 
  8850.  
  8851. iosobj.clear(ios::colon.::colon.colon.::colon.::colon.colon.badbit|iosobj.rdstate());
  8852. want; 
  8853.  
  8854. bits to  with,. int  ;iosbitwithbitsothersetsofbitsof) 
  8855.  
  8856. with,.all
  8857. with,you iosobj.all
  8858. with,If For0 sets:
  8859. (you  . and|)example;without:
  8860. (you andrdstate)example;.all
  8861. with,you iosobj: For0 : you .all
  8862.  
  8863. bitwise the with int; set changes bits ios bit with ; can bits ios bit with 
  8864. clearing  ;voidiosobj:| ) example ; ORwithoutstatementwant ;
  8865.  
  8866. bits to with,. int changes; ios bit with bits other sets of  .  bits of ; its 
  8867. state |)example;without: bits its state rdstate)example;; void other following 
  8868. colon : one in with ; 
  8869.  
  8870. to ios bit with clearing other leaves  iosobj ;voidiosobj:| ) 
  8871. ORwithoutstatementwant 
  8872. ;intbadbitbitclearrdstatearedefaultunchangederrorbitscurrentclearedequals;voidof=of= :clearrdstate;:
  8873.  
  8874. clear bits() are;
  8875.  
  8876. bits() error = current If can badbit cleared::and.::and.and.::and.::and.and.all 
  8877. default cleared::and.::and.and.::and.::and.and.bitwise  error  clearing example 
  8878. changes For bit following. equals, colon error 0.  changes bits ios bit with 
  8879. bit(canbitsiosbitwithclearingotherleaves;voidiosobj:| ) example ; OR withoutstatement
  8880.  
  8881. with,.all
  8882. with,you  .(iosobjsets . :
  8883. (you and|)example;without:
  8884. (you andrdstate)example;.all
  8885. with,you iosobj: For0 ,.(: you .all
  8886.  
  8887. bitwise the  with int; set changes bits ios bit with 
  8888. ; canbitsiosbitwithclearingotherleavesiosobj ;voidiosobj:| ) example ; 
  8889. ORstatement want; 
  8890.  
  8891. bits to with,.  other leaves iosobj; void iosobj : |)example;OR without  badbit 
  8892. bit clear rdstate are default  current cleared equals ; void of = of =: clear 
  8893. rdstate  ;:
  8894.  
  8895. clear bits() are;
  8896.  
  8897. bits() error = current If can badbit cleared::and.::and.and :and.::and .all 
  8898. default cleared::and.::and. ::and.::and.and.bitwise clearing example changes 
  8899. For bit following. equals, colon error 0. default  error bits  equals   . ( of 
  8900. = of  :clearrdstate|
  8901.  
  8902. with,.all
  8903. with,you iosobj.all
  8904. with,If For0 sets:
  8905. (you and|)example;without:
  8906. (you andrdstate)example;.all
  8907. with,you iosobj: For0 : you .all
  8908.  
  8909. bitwise the with int; set changes bits ios bit with ; can bits ios bit with 
  8910. clearing other leaves iosobj; void iosobj : |)example;OR without statement 
  8911. want; 
  8912.  
  8913. bits to with,. int changes; ios bits other sets of bits of ; its state 
  8914. |)example;without: bits its state rdstate)example;; void other following colon 
  8915. : one in with ; 
  8916.  
  8917. to ios bit with clearing other leaves iosobj; void iosobj : |)example;OR 
  8918. without statement want; int badbit bit clear rdstate are default unchanged 
  8919. error bits current cleared equals ; void of = of =: clear rdstate ; . ( state = 
  8920. 0 ) ; 
  8921.  
  8922. clear() changes the error state of iosobj to state. If state equals 0 (its 
  8923. default), all of the bits in the error state are cleared. If you want to set 
  8924. one of the bits without clearing the other bits in the error state, you can 
  8925. bitwise OR the bit you want to set with the current error state. For example, 
  8926. the following statement sets 
  8927. ios::colon.::colon.colon.::colon.::colon.colon.badbit in iosobj and leaves all 
  8928. the other error state bits unchanged: 
  8929.  
  8930. iosobj.clear(ios::colon.::colon.colon.::colon.::colon.badbit|iosobj.rdstate());
  8931. bit ( want; 
  8932.  
  8933. bits to  with,. int  ;iosbitwithbitsothersetsofbitsof) 
  8934.  
  8935. with,.all
  8936. with,you iosobj.all
  8937. with,If For0 sets:
  8938. (you  . and|)example;without:
  8939. (you andrdstate)example;.all
  8940. with,you iosobj: For0 : you .all
  8941.  
  8942. bitwise the with int; set changes bits ios bit with can bits ios bit with 
  8943. clearing  bit ( ;voidiosobj:| ) example ; ORwithoutstatementwant ;
  8944.  
  8945. bits to with,. int changes; ios bit with bits other sets of  .  bits of ; its 
  8946. state |)example;without: bits its state rdstate)example;; void other following 
  8947. colon : one in with ; 
  8948.  
  8949. to ios bit with clearing other leaves  iosobj iosobj : |)bit(OR without 
  8950. statement want; int badbit bit clear rdstate are default unchanged error bits 
  8951. current cleared equals ; void of = of =: clear rdstate ; : 
  8952.  
  8953. clear bits() are;
  8954.  
  8955. bits() error = current If can badbit cleared::and.::and.and.::and.::and.and.all 
  8956. default cleared::and.::and.and.::and.::and.and.bitwise  error  clearing example 
  8957. changes For bit following. equals, colon error 0.  changes bits ios bit with 
  8958.  
  8959. ifstream();
  8960. ifstream(int d);
  8961. ifstream(const char* fname,
  8962.          int mode=ios&c2.in,
  8963.          int prot=filebuf&c2.openprot);
  8964. ifstream(int d, char* p, int len);
  8965.  
  8966. There are four versions of the ifstream constructor. The first version takes no 
  8967. arguments and constructs an unopened ifstream object. The second version takes 
  8968. one argument and constructs an ifstream object that is attached to the file 
  8969. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  8970. ifs. 
  8971.  
  8972. The third and fourth versions of the ifstream() constructor take three 
  8973. arguments. The third version constructs an ifstream object and opens the file 
  8974. fname with open mode equal to mode and protection mode equal to prot. The 
  8975. default value for mode is ios&c2.in, and the default value for prot is 
  8976. filebuf&c2.openprot. If the file cannot be opened, the error state of the 
  8977. constructed ifstream object is set. 
  8978.  
  8979. The fourth version constructs an ifstream object that is attached to the file 
  8980. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  8981. ifs. This constructor also sets up an associated filebuf object with a stream 
  8982. buffer that has length len bytes and begins at the position pointed to by p. If 
  8983. p is equal to 0 or len is equal to 0, the associated filebuf object is 
  8984. unbuffered. 
  8985.  
  8986. int eof() const;
  8987.  
  8988. eof() returns a nonzero value if 
  8989. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is set in the error state 
  8990. of iosobj. Otherwise, it returns 0. 
  8991. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is usually set when an 
  8992. EOF has been encountered during an extraction operation. been .  : : been . : : 
  8993. been . been . eofhasiseofbitnonzeroduringit .ios ,ifiosobj0 
  8994. .int iosobjencountered ios  .(usuallyausually: error   0  , iosobj ) 0an ; been ;if 0eofbit
  8995.  
  8996. ,.an
  8997. , set.an
  8998. ,of nonzero0 :
  8999. ( been)is;:
  9000. ( been)is;.an
  9001. , set: nonzero0 :  .an
  9002.  
  9003. eof Otherwise; eofbit encountered returns during 
  9004. ;EOFencounteredreturnsduringhastheset ;set:) is ; when;
  9005.  
  9006. encountered ,. Otherwise eofbit; returns during ( encountered usually 
  9007. encountered usually ;state) is ; :encounteredstate) is ; ;itif:valueoperation;
  9008.  
  9009. returns during has the set; set : )is;when ; Otherwise const during error colon 
  9010. int iosobj encountered in extraction ios ; usually a usually a: error ; . ( a 0 
  9011. ) ; 
  9012.  
  9013. error() eofbit iosobj usually .  . of ios 0 (state int), an usually encountered 
  9014. operation iosobj colon extraction. of value usually encountered has encountered 
  9015. operation iosobj , EOF eof when during in iosobj . nonzero is, it 
  9016. returns::if.::if.if.::if.::if.if.const operation set been the an encountered : 
  9017.  
  9018. set.error(returns::if.::if.if.::if.::ifduring(.constset.());
  9019. during ( ; 
  9020.  
  9021. encountered  ,. Otherwise  ;returnsduringencounteredusuallyencounteredusually
  9022.  
  9023. ,.an
  9024. , set.an
  9025. ,of nonzero0 :
  9026. (  . been)is;:
  9027. ( been)is;.an
  9028. , set: nonzero0 :  .an
  9029.  
  9030. eof Otherwise; eofbit encountered returns during during ( EOF encountered 
  9031. returns during has  during ( ;set:) is ; when;
  9032.  
  9033. encountered ,. Otherwise eofbit; returns during encountered usually  . 
  9034. encountered usually ;state) is ; :encounteredstate) is ; ;itif:valueoperation;
  9035.  
  9036. returns during has the  set during(set:) during ( when; Otherwise const during 
  9037. error colon int iosobj encountered in extraction ios ; usually a usually a: 
  9038. error ; : 
  9039.  
  9040. error encountered() colon;
  9041.  
  9042. encountered() iosobj a in of EOF const extraction::been.::been.: been . : : 
  9043. been . been . anintextraction : : been . : : been . been . : : been . : : been 
  9044. . been . eof iosobj hasiseofbitnonzeroduringit .ios ,ifiosobj0 
  9045. . eofbitencounteredreturnsduring) 
  9046.  
  9047. ,.an
  9048. , set.an
  9049. ,of nonzero0 :
  9050. ( been)is;:
  9051. ( been)is;.an
  9052. , set: nonzero0 :  .an
  9053.  
  9054. eof Otherwise; eofbit encountered returns during ; EOF encountered returns 
  9055. during has the set; set : )is;when ; 
  9056.  
  9057. encountered ,. Otherwise eofbit; returns during encountered usually encountered 
  9058. usually ; state )is;: encountered state )is;; :valueoperation;
  9059.  
  9060. returns during has the set; set : )is;when ; Otherwise const during error colon 
  9061. int iosobj encountered in extraction ios ; usually usually a: error ; int 
  9062.  
  9063. int eof() const;
  9064.  
  9065. eof() returns a nonzero value if 
  9066. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is set in the error state 
  9067. of iosobj. Otherwise, it returns 0. 
  9068. ios::colon.::colon.colon.::colon.::colon.colon.eofbit  is usually set when an 
  9069. EOF has been encountered during an extraction operation. .  been .  : : been . 
  9070. : : been . been . eofhasiseofbitnonzeroduringit .ios ,ifiosobj0 
  9071. .int iosobjencountered ios  .(usuallyausually: error   0 
  9072.  
  9073. ,.an
  9074. , set.an
  9075. ,of nonzero0 :
  9076. ( been)is;:
  9077. ( been)is;.an
  9078. , set: nonzero0 :  .an
  9079.  
  9080. eof Otherwise; eofbit encountered returns during 
  9081. ;EOFencounteredreturnsduringhastheset ;set:) is ; when;
  9082.  
  9083. encountered ,. Otherwise eofbit; returns during ( encountered usually 
  9084. encountered usually ;state) is ; :encounteredstate) is ; ;itif:valueoperation;
  9085.  
  9086. returns during has the set; set : )is;when ; Otherwise const during error colon 
  9087. int iosobj encountered in extraction ios ; usually a usually a: error ; . ( a 0 
  9088. ) ; 
  9089.  
  9090. error() eofbit iosobj usually .  . of ios 0 (state int), an usually encountered 
  9091. operation iosobj colon extraction. of value usually encountered has encountered 
  9092. operation iosobj , EOF eof when during in iosobj . nonzero is, it 
  9093. returns::if.::if.if.::if.::if.if.const operation set been the an encountered : 
  9094.  
  9095. set.error(returns::if.::if.if.::if.::ifduring(.constset.());
  9096. during ( ; 
  9097.  
  9098. encountered  ,. Otherwise  ;returnsduringencounteredusuallyencounteredusually
  9099.  
  9100. ,.an
  9101. , set.an
  9102. ,of nonzero0 :
  9103. (  . been)is;:
  9104. ( been)is;.an
  9105. , set: nonzero0 :  .an
  9106.  
  9107. eof Otherwise; eofbit encountered returns during during ( EOF encountered 
  9108. returns during has  during ( ;set:) is ; when;
  9109.  
  9110. encountered ,. Otherwise eofbit; returns during encountered usually  . 
  9111. encountered usually ;state) is ; :encounteredstate) is ; ;itif:valueoperation;
  9112.  
  9113. returns during has the  set during(set:) during ( when; Otherwise const during 
  9114. error colon int iosobj encountered in extraction ios ; usually a usually a: 
  9115. error ; : 
  9116.  
  9117. error encountered() colon;
  9118.  
  9119. encountered() iosobj a in of EOF const extraction::been.::been.: been . : : 
  9120. been . been . anintextraction : : been . : : been . been . : : been . : : been 
  9121. . been . eof iosobj hasiseofbitnonzeroduringit .ios ,ifiosobj0 
  9122. . eofbitencounteredreturnsduring) 
  9123.  
  9124. ,.an
  9125. , set.an
  9126. ,of nonzero0 :
  9127. ( been)is;:
  9128. ( been)is;.an
  9129. , set: nonzero0 :  .an
  9130.  
  9131. eof Otherwise; eofbit encountered returns during ; EOF encountered returns 
  9132. during has the set; set : )is;when ; 
  9133.  
  9134. encountered ,. Otherwise eofbit; returns during encountered usually encountered 
  9135. usually ; state )is;: encountered state )is;; :valueoperation;
  9136.  
  9137. returns during has the set; set : )is;when ; Otherwise const during error colon 
  9138. int iosobj encountered in extraction ios ; usually usually a: error ; int 
  9139.  
  9140. int eof() const;
  9141.  
  9142. eof() returns a nonzero value if 
  9143. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is set in the error state 
  9144. of iosobj. Otherwise, it returns 0. 
  9145. ios::colon.::colon.colon.::colon.::colon.colon.eofbit  is usually set when an 
  9146. EOF has been encountered during an extraction operation. .  been .  : : been . 
  9147. : : been . been . eofhasiseofbitnonzeroduringit .ios ,ifiosobj0 
  9148. .int iosobjencountered ios  .(usuallyausually: error   0 
  9149.  
  9150. ifstream();
  9151. ifstream(int d);
  9152. ifstream(const char* fname,
  9153.          int mode=ios&c2.in,
  9154.          int prot=filebuf&c2.openprot);
  9155. ifstream(int d, char* p, int len);
  9156.  
  9157. There are four versions of the ifstream constructor. The first version takes no 
  9158. arguments and constructs an unopened ifstream object. The second version takes 
  9159. one argument and constructs an ifstream object that is attached to the file 
  9160. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  9161. ifs. 
  9162.  
  9163. The third and fourth versions of the ifstream() constructor take three 
  9164. arguments. The third version constructs an ifstream object and opens the file 
  9165. fname with open mode equal to mode and protection mode equal to prot. The 
  9166. default value for mode is ios&c2.in, and the default value for prot is 
  9167. filebuf&c2.openprot. If the file cannot be opened, the error state of the 
  9168. constructed ifstream object is set. 
  9169.  
  9170. The fourth version constructs an ifstream object that is attached to the file 
  9171. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  9172. ifs. This constructor also sets up an associated filebuf object with a stream 
  9173. buffer that has length len bytes and begins at the position pointed to by p. If 
  9174. p is equal to 0 or len is equal to 0, the associated filebuf object is 
  9175. unbuffered. 
  9176.  
  9177. int fail() const;
  9178.  
  9179. fail() returns a nonzero value if either 
  9180. ios::colon.::colon.colon.::colon.::colon.colon.badbit or 
  9181. ios::colon.::colon.colon.::colon.::colon.colon.failbit is set in the error 
  9182. state. Otherwise, it returns 0. if failbit error nonzero returns . the set, 
  9183. state ::it.::it.it.::it.::it.it.either colon badbit  fail : 
  9184.  
  9185. .int(::it.::it.it.::it.error(.either.());
  9186. error ( ; 
  9187.  
  9188. fail  ,.  ;errorfailfail
  9189.  
  9190. badbit
  9191. , .badbit
  9192. ,value the0 :
  9193. (  . colon)set;:
  9194. ( colon)set;.badbit
  9195. , : the0 :  .badbiteither
  9196.  
  9197. failbit;infailerror error(iffailerroris error(; : )set;;
  9198.  
  9199. fail,. in; error fail  .  fail  ;) set ; :fail) set ; returns ; state it : ;
  9200.  
  9201. erroris error ( : )error( ; either error int const or (returnsfailnonzeroiosOtherwise;aa :int;:
  9202.  
  9203. int fail() const;
  9204.  
  9205. fail() returns a nonzero value if either ios::colon.::colon.: colon . : : colon 
  9206. . colon . badbitorios : : colon . : : colon . colon . : : colon . : : colon . 
  9207. colon . failbit returns issetintheerrorstate .Otherwise ,itreturns0 
  9208. . infailerror) 
  9209.  
  9210. ,.badbit
  9211. , .badbit
  9212. ,value the0 ( colon)set;:
  9213. ( colon)set;.badbit
  9214. , : the0 :  .badbit
  9215.  
  9216. failbit ; in fail error ; error is ; : )set;; 
  9217.  
  9218. fail ,. in; error fail fail ; )set;: fail )set;; state  :;
  9219.  
  9220. error is ; : )set;; either error int const or returns fail nonzero ios 
  9221. Otherwise ;   a: int ; or 
  9222.  
  9223. or failbit() either;
  9224.  
  9225. failbit() a the it Otherwise::const.::const.const.::const.::const.const.in set 
  9226. nonzero int value returns. , state 0. 
  9227. Otherwise::const.::const.const.::const.::const.const.in 
  9228.  
  9229. ,.badbit
  9230. , .badbit
  9231. ,value the0 :
  9232. ( colon)set;:
  9233. ( colon)set;.badbit
  9234. , : the0 :
  9235.  
  9236.  
  9237. ΓòÉΓòÉΓòÉ <hidden> n.colon.::colon.::colon.colon.failbit and ios::colon.::co ΓòÉΓòÉΓòÉ
  9238.  
  9239.  . badbit 
  9240.  
  9241. failbit ; in fail error ; if fail error is ; : )set;; 
  9242.  
  9243. fail ,. in; error fail fail ; )set;: fail ) set ; ;stateit:;
  9244.  
  9245. error is ; : )set;; either error int returns fail nonzero ios Otherwise ; a a: 
  9246. int ; : colon . colon . : : colon . : : colon . colon . badbitorios : : colon . 
  9247. : : colon . colon . : : colon . : : colon . colon . failbitissetintheerrorstate 
  9248. .Otherwise ,itreturns0 . iffailbiterrornonzeroreturns.theset ,state: : : it . 
  9249. it . : : it . : : it . it . eithercolonbadbit fail:
  9250.  
  9251. .int(::it.::it.it.::it.: error(.either.());
  9252. error ( ; 
  9253.  
  9254. fail ,.  ;errorfailfail
  9255.  
  9256.  badbit
  9257. , .badbit
  9258. ,value the0 :
  9259. ( . colon)set;:
  9260. ( colon)set;.badbit
  9261. , : the0 :  .badbit
  9262.  either
  9263.  
  9264. failbit;infailerror error(iffailerroriserror(; : )set;;
  9265.  
  9266. fail ,. in; error fail . fail ; )set;: fail )set; returns ; state it : ;
  9267.  
  9268. erroriserror ( : )error( ; either error int const or a :int;:
  9269.  
  9270. int fail() const;
  9271.  
  9272. fail() returns a nonzero value if either 
  9273. ios::colon.::colon.colon :colon.::colon.colon.badbit or 
  9274. ios::colon.::colon.colon.::colon.::colon.colon.returns  is set in the error 
  9275. state. Otherwise, it returns 0.  in fail error )
  9276.  
  9277. ,.badbit
  9278. , .badbit
  9279. ,value the0  ( colon)set;:
  9280. ( colon)set;.badbit
  9281. ,,.(: the0 :  .badbit
  9282.  
  9283. failbit ; in fail error ; if  error is ; : ; ;
  9284.  
  9285. fail ,. in; error fail  fail ; ) )set;: fail )set;; state  :;
  9286.  
  9287. error  is ; : )set;returns  ; either error int const or returns fail nonzero 
  9288. ios Otherwise ; 
  9289.  
  9290. failbit() a the it Otherwise::const.::const.const.::const.::const.const.in set 
  9291. nonzero int value returns.  ,state0 .Otherwise : : const . : : const . const . 
  9292. : : const . : : const . const . inreturns ) if is colon fail error badbit ios . 
  9293. .  colon .  : : colon . : : colon . colon . failbitissetintheerrorstate 
  9294. .Otherwise ,itreturns0 .or returnsfail Otherwise  .(a
  9295.  
  9296. ,.badbit
  9297. , .badbit
  9298. ,value the0 :
  9299. ( colon)set;:
  9300. ( colon)set;.badbit
  9301. , : the0 :   .badbit
  9302.  
  9303. failbit ; in fail error ; if fail error is ; : )set;; 
  9304.  
  9305. fail ,. in; error fail fail ; )set;: fail ) set ; ;stateit:;
  9306.  
  9307. error is ; : )set;; either error int returns fail nonzero ios Otherwise ; a a: 
  9308. int ; : colon . colon . : : colon . : : colon . colon . badbitorios : : colon . 
  9309. : : colon . colon . : : colon . : : colon . colon . failbitissetintheerrorstate 
  9310. .Otherwise ,itreturns0 . iffailbiterrornonzeroreturns.theset ,state: : : it . 
  9311. it . : : it . : : it . it . eithercolonbadbit fail:
  9312.  
  9313. .int(::it.::it.it.::it.: error(.either.());
  9314. error ( ; 
  9315.  
  9316. fail ,.  ;errorfailfail
  9317.  
  9318.  badbit
  9319. , .badbit
  9320. ,value the0 :
  9321. ( . colon)set;:
  9322. ( colon)set;.badbit
  9323. , : the0 :  .badbit
  9324.  either
  9325.  
  9326. failbit;infailerror error(iffailerroriserror(; : )set;;
  9327.  
  9328. fail ,. in; error fail . fail ; )set;: fail )set; returns ; state it : ;
  9329.  
  9330. erroriserror ( : )error( ; either error int const or
  9331.  
  9332. ifstream();
  9333. ifstream(int d);
  9334. ifstream(const char* fname,
  9335.          int mode=ios&c2.in,
  9336.          int prot=filebuf&c2.openprot);
  9337. ifstream(int d, char* p, int len);
  9338.  
  9339. There are four versions of the ifstream constructor. The first version takes no 
  9340. arguments and constructs an unopened ifstream object. The second version takes 
  9341. one argument and constructs an ifstream object that is attached to the file 
  9342. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  9343. ifs. 
  9344.  
  9345. The third and fourth versions of the ifstream() constructor take three 
  9346. arguments. The third version constructs an ifstream object and opens the file 
  9347. fname with open mode equal to mode and protection mode equal to prot. The 
  9348. default value for mode is ios&c2.in, and the default value for prot is 
  9349. filebuf&c2.openprot. If the file cannot be opened, the error state of the 
  9350. constructed ifstream object is set. 
  9351.  
  9352. The fourth version constructs an ifstream object that is attached to the file 
  9353. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  9354. ifs. This constructor also sets up an associated filebuf object with a stream 
  9355. buffer that has length len bytes and begins at the position pointed to by p. If 
  9356. p is equal to 0 or len is equal to 0, the associated filebuf object is 
  9357. unbuffered. 
  9358.  
  9359. void clear(int state=0);
  9360.  
  9361. clear() changes the error state of iosobj to state. If state equals 0 (its 
  9362. default), all of the bits in the error state are cleared. If you want to set 
  9363. one of the bits without clearing the other bits in the error state, you can 
  9364. bitwise OR the bit you want to set with the current error state. For example, 
  9365. the following statement sets 
  9366. ios::colon.::colon.colon.::colon.::colon.colon.badbit in iosobj and leaves all 
  9367. the other error state bits unchanged: 
  9368.  
  9369. iosobj.clear(ios::colon.::colon.colon.::colon.::colon.colon.badbit|iosobj.rdstate());
  9370.  
  9371. with,.all
  9372. with,you iosobj.all
  9373. with,If For0 sets:
  9374. (you and|)example;without:
  9375. (you andrdstate)example;.all
  9376. with,you iosobj: For0 : you  with , .intchanges ;iosbitsothersetsofbitsof;itsstate| ) example ; without :bitsitsstate )example;; void other following colon : one in with ;
  9377.  
  9378. toiosbitwithclearingotherleavesiosobj ;voidiosobj:| ) example ; ORwithoutstatementwant ;intbadbitbitclearrdstateare unchangederrorbitscurrentclearedequals;voidof=of= :clearrdstate;state youcanbitwiseORthebityouwanttosetwiththecurrenterrorstate .Forexample ,thefollowingstatementsetsios : : colon  : colon . colon . : : colon . : : colon . colon . badbitiniosobjandleavesalltheother bitsunchanged :
  9379.  
  9380. iosobj.clear(ios::colon.::colon.colon.::colon.: .badbit|iosobj.rdstate());
  9381. bit ( want; 
  9382.  
  9383. bits to  with,. int  ;iosbitwithbitsothersetsofbitsof
  9384.  
  9385. with all
  9386. with,you iosobj.all
  9387. with,If For0 sets:
  9388. (you  . and|)example;without:
  9389. (you andrdstate)example;.all
  9390. with,you iosobj: For0 : you .all
  9391.  badbit
  9392.  
  9393. bitwisethewithint ;setchangesbitsiosbitwith canbitsiosbitwithclearing bit(; void iosobj : |)example;OR without statement want;
  9394.  
  9395. bitsto ,. int changes; ios bit with bits other sets of  .  bits of  ;itsstate| ) example ; without :bitsitsstaterdstate ) example ;  error  ;voidotherfollowingcolon:oneinwith;
  9396.  
  9397. toiosbitwithclearingotherleaves iosobjiosobj:| ) bit ( ORwithout want ;intbadbitbitclearrdstatearedefaultunchanged andrdstate)example;.all
  9398. with,you iosobj: For0 : you .all
  9399.  
  9400. bitwise the with int; set changes bits ios bit with can bits ios bit with 
  9401. clearing other leaves iosobj; void iosobj : |)example;OR without statement 
  9402. want; 
  9403.  
  9404. bits to with,. int changes; ios bit with bits other sets of bits of ; its state 
  9405. |)example;without: bits its state rdstate)example;; void other following colon 
  9406. : one in with ; 
  9407.  
  9408. to ios bit with clearing other leaves iosobjiosobj : |)example;OR without 
  9409. statement want; int badbit bit clear rdstate are default unchanged error bits 
  9410. current cleared equals ; void of = of =: clear rdstate ; bit ( 
  9411.  
  9412. void clear(int state=0);
  9413.  
  9414. clear() changes the error state of iosobj to state. If state equals 0 (its 
  9415. default), all of the bits in the error state are cleared. If you want to set 
  9416. one of the bits without clearing the other bits in the error state, you can 
  9417. bitwise OR error  the bit you want to set with the current error state. For 
  9418. example, the following statement sets 
  9419. ios::colon.::colon.colon.::colon.::colon.colon.badbit in iosobj and leaves all 
  9420. the other error state bits unchanged: 
  9421.  
  9422. iosobj.clear(ios::colon.::colon.colon.::colon.::colon.colon.badbit|iosobj.rdstate());
  9423.  . : : are . are . changes
  9424.  
  9425. with,.all
  9426. with,you iosobj.all
  9427. with,If For0 sets:
  9428. (you and|)example;without:
  9429. (you andrdstate)example;.all
  9430. with,you iosobj: For0 : you  with , .intchanges ;iosbitsothersetsofbitsof;itsstate| ) example ; without :bitsitsstate )example;; void other following colon : one in with ;
  9431.  
  9432. toiosbitwithclearingotherleavesiosobj ;voidiosobj:| ) example ; ORwithoutstatementwant ;intbadbitbitclearrdstateare unchangederrorbitscurrentclearedequals;voidof=of= :clearrdstate;state youcanbitwiseORthebityouwanttosetwiththecurrenterrorstate .Forexample ,thefollowingstatementsetsios : : colon  : colon . colon . : : colon . : : colon . colon . badbitiniosobjandleavesalltheother bitsunchanged :
  9433.  
  9434. iosobj.clear(ios::colon.::colon.colon.::colon.:
  9435.  
  9436. ifstream();
  9437. ifstream(int d);
  9438. ifstream(const char* fname,
  9439.          int mode=ios&c2.in,
  9440.          int prot=filebuf&c2.openprot);
  9441. ifstream(int d, char* p, int len);
  9442.  
  9443. There are four versions of the ifstream constructor. The first version takes no 
  9444. arguments and constructs an unopened ifstream object. The second version takes 
  9445. one argument and constructs an ifstream object that is attached to the file 
  9446. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  9447. ifs. 
  9448.  
  9449. The third and fourth versions of the ifstream() constructor take three 
  9450. arguments. The third version constructs an ifstream object and opens the file 
  9451. fname with open mode equal to mode and protection mode equal to prot. The 
  9452. default value for mode is ios&c2.in, and the default value for prot is 
  9453. filebuf&c2.openprot. If the file cannot be opened, the error state of the 
  9454. constructed ifstream object is set. 
  9455.  
  9456. The fourth version constructs an ifstream object that is attached to the file 
  9457. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  9458. ifs. This constructor also sets up an associated filebuf object with a stream 
  9459. buffer that has length len bytes and begins at the position pointed to by p. If 
  9460. p is equal to 0 or len is equal to 0, the associated filebuf object is 
  9461. unbuffered. 
  9462.  
  9463. int eof() const;
  9464.  
  9465. eof() returns a nonzero value if 
  9466. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is set in the error state 
  9467. of iosobj. Otherwise, it returns 0. 
  9468. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is usually set when an 
  9469. EOF has been encountered during an extraction operation.  been ) is ; . an 
  9470. ,  set :  nonzero 0  :   . an 
  9471.  
  9472. eof Otherwise; eofbit encountered returns during 
  9473. during(EOFencounteredreturnsduringhastheset ;set:) is ; when; 
  9474.  
  9475. encountered ,. Otherwise eofbit; returns during encountered usually encountered 
  9476. usually ; state )is;: encountered state )is;iosobj  ;itif:valueoperation;
  9477.  
  9478. returns during has the setduring ( set : )is;when ; Otherwise const during 
  9479. error colon int iosobj encountered in extraction ios ; usually a usually a: 
  9480. error ; during ( 
  9481.  
  9482.  error(Otherwise a0);
  9483.  
  9484. error() eofbit iosobj usually set . of ios 0 (state int), an usually 
  9485. encountered operation iosobj colon extraction. of value usually encountered has 
  9486. iosobj , EOF eof when during ( iosobj  during in iosobj . nonzero is, it 
  9487. returns::if.::if.if.::if.::if.if.const operation set been the an iosobj 
  9488. encountered : 
  9489.  
  9490. set.error(returns::if.::if.if.::if.::if.if.constset.());
  9491. . : : colon . colon . eofbit
  9492.  
  9493. ,.an
  9494. , set.an
  9495. ,of nonzero0 :
  9496. ( been)is;:
  9497. ( been)is;.an
  9498. , set: nonzero0 :  ; EOF encountered returns during has the set; set : )is;when ;
  9499.  
  9500. encountered , .Otherwiseeofbit ;returnsduring(encounteredusuallyencounteredusually; state )is;: encountered state  ) is ; ;itif:valueoperation;
  9501.  
  9502. returnsduringhastheset ;set:) is ; when;Otherwiseconstduringerrorcolon iosobjencounteredinextractionios;usuallyausuallya :error;:been.::been.been.an int extraction::been.::been.been.::been.::been.been.eof has is eofbit nonzero during it. ios, if iosobj 0.  EOF eof when during in iosobj . nonzero is, it returns::if :if.if.::if.::if.if.const operation set been the an encountered:
  9503.  
  9504. set.error(returns::if.::if.if.::if.: )
  9505.  
  9506. ,.an
  9507. , set.an
  9508. ,of nonzero0 :
  9509. ( been)is;:
  9510. ( been)is;.an
  9511. , set: nonzero0 :.an
  9512.  
  9513. eof Otherwise; eofbit encountered returns during ; EOF encountered returns 
  9514. during has the set; set : )is;when ; 
  9515.  
  9516. encountered ,. Otherwise eofbit; during encountered usually encountered usually 
  9517. ; state )is;: encountered state )is;; it if : value operation ; 
  9518.  
  9519. returns during has the set ;set:) is ; 
  9520. when;Otherwiseconstduringerrorcolonintiosobjencounteredinextractionios;usuallyausuallya :error;)
  9521.  
  9522. int eof()
  9523.  
  9524. eof() returns a nonzero value if 
  9525. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is set in the error state 
  9526. of iosobj. Otherwise, it returns 0. 
  9527. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is usually set when an 
  9528. EOF has been encountered during an extraction operation. 
  9529.   ) is ; . an 
  9530. ,  set :  nonzero 0  :   . an 
  9531.  
  9532. eof Otherwise; eofbit encountered returns during 
  9533. during(EOFencounteredreturnsduringhastheset ;set:) is ; when ;
  9534.  
  9535. encountered ,. Otherwise eofbit; returns during encountered usually encountered 
  9536. usually ; state )is;: encountered state )is; iosobj ; it if : value operation ; 
  9537.  
  9538. returns during has the setduring ( set : )is;when ; Otherwise const during 
  9539. error colon int iosobj encountered in extraction ios ; usually a . ( usually a: 
  9540. error ; during ( 
  9541.  
  9542.  error(Otherwise a0);
  9543.  
  9544. error() eofbit iosobj usually set . of ios 0 (state int), an usually 
  9545. encountered operation iosobj colon extraction. of value usually encountered has 
  9546. iosobj , EOF eof ) when during ( iosobj  during in iosobj . nonzero is, it 
  9547. returns::if.::if.if.::if.::if.if.const operation set been the an iosobj 
  9548. encountered : 
  9549.  
  9550. set.error(returns::if.::if.if.::if.::if.if.constset.());
  9551.  . : : colon . colon . eofbit is usually set when an  iosobj ) EOF has been 
  9552. encountered during an extraction operation. .  been .  : : been . : : been . 
  9553. been . eofhasiseofbitnonzeroduringit .ios ,ifiosobj0 
  9554. .int iosobjencountered ios  .(usuallyausually: error   0 
  9555.  
  9556. ,.an
  9557. , set.an
  9558. ,of nonzero0 :
  9559. ( been)is;:
  9560. ( been)is;.an
  9561. , set: nonzero0 :  ; EOF encountered returns during has the set; set : )is;when ;
  9562.  
  9563. encountered , .Otherwiseeofbit ;returnsduring(encounteredusuallyencounteredusually; state )is;: encountered state  ) is ; ;itif:valueoperation;
  9564.  
  9565. returnsduringhastheset ;set:) is ; when;Otherwiseconstduringerrorcolon iosobjencounteredinextractionios;usuallyausuallya :error;:been.::been.been.an int extraction::been.::been.been.::been.::been.been.eof has is eofbit nonzero during it. ios, if iosobj 0.  EOF eof when during in iosobj . nonzero is, it returns::if :if.if.::if.::if.if.const operation set been the an encountered:
  9566.  
  9567. set.error(returns::if.::if.if.::if.: )
  9568.  
  9569. ,.an
  9570. , set.an
  9571. ,of nonzero0 :
  9572. ( been)is;:
  9573. ( been)is;.an
  9574. , set: nonzero0 :.an
  9575.  
  9576. eof Otherwise; eofbit encountered returns during ; EOF encountered returns 
  9577. during has the set; set : )is;when ; 
  9578.  
  9579. encountered ,. Otherwise eofbit; during encountered usually encountered usually 
  9580. ; state )is;: encountered state )is;; it if : value operation ; 
  9581.  
  9582. returns during has the set ;set:) is ; 
  9583. when;Otherwiseconstduringerrorcolonintiosobjencounteredinextractionios;usuallyausuallya :error;)
  9584.  
  9585. int eof()
  9586.  
  9587. eof() returns a nonzero value if 
  9588. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is set in the error state 
  9589. of iosobj. Otherwise, it returns 0. 
  9590. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is usually set when an 
  9591. EOF has been encountered during an extraction operation. 
  9592.   ) is ; . an 
  9593. ,  set :  nonzero 0  :   . an 
  9594.  
  9595. eof Otherwise; eofbit encountered returns during 
  9596. during(EOFencounteredreturnsduringhastheset ;set:) is ; when
  9597.  
  9598. ifstream();
  9599. ifstream(int d);
  9600. ifstream(const char* fname,
  9601.          int mode=ios&c2.in,
  9602.          int prot=filebuf&c2.openprot);
  9603. ifstream(int d, char* p, int len);
  9604.  
  9605. There are four versions of the ifstream constructor. The first version takes no 
  9606. arguments and constructs an unopened ifstream object. The second version takes 
  9607. one argument and constructs an ifstream object that is attached to the file 
  9608. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  9609. ifs. 
  9610.  
  9611. The third and fourth versions of the ifstream() constructor take three 
  9612. arguments. The third version constructs an ifstream object and opens the file 
  9613. fname with open mode equal to mode and protection mode equal to prot. The 
  9614. default value for mode is ios&c2.in, and the default value for prot is 
  9615. filebuf&c2.openprot. If the file cannot be opened, the error state of the 
  9616. constructed ifstream object is set. 
  9617.  
  9618. The fourth version constructs an ifstream object that is attached to the file 
  9619. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  9620. ifs. This constructor also sets up an associated filebuf object with a stream 
  9621. buffer that has length len bytes and begins at the position pointed to by p. If 
  9622. p is equal to 0 or len is equal to 0, the associated filebuf object is 
  9623. unbuffered. 
  9624.  
  9625. int fail() const;
  9626.  
  9627. fail() returns a nonzero value if either 
  9628. ios::colon.::colon.colon.::colon.::colon.colon.badbit or 
  9629. ios::colon.::colon.colon.::colon.::colon.colon.failbit is set in the error 
  9630. state. Otherwise, it returns 0. returns fail  Otherwise   . ( a 
  9631. :int  0 ,returns)0 badbit;colon; it  0 in a error  :badbit
  9632.  
  9633. ,.badbit
  9634. , .badbit
  9635. ,value the0 :
  9636. ( colon)set;:
  9637. ( colon)set;.badbit
  9638. , : the0 :   .badbit
  9639.  
  9640. failbit ; in fail error  ;iffailerroris;:) set ; ;
  9641.  
  9642. fail ,. in; error ( fail fail  ;) set ; :fail) set ; ;stateit:;
  9643.  
  9644. error is ; : )set; ; either error int returns fail nonzero ios Otherwise ; a a: 
  9645. int ; : colon . colon  : colon . : : colon . colon . badbitorios : : colon . : 
  9646. : colon . colon . : : colon . : : colon . colon . failbitissetintheerrorstate 
  9647. .Otherwise ,itreturns0 . iffailbiterrornonzeroreturns.theset ,state: : : it . 
  9648. it . : : it . : : it . it . eithercolonbadbit fail:
  9649.  
  9650. .int(::it.::it.it.::it.: )
  9651.  
  9652. ,.badbit
  9653. , .badbit
  9654. ,value the0 : colon)set;:
  9655. ( colon)set;.badbit
  9656. , : the0 :  .badbit
  9657.  
  9658. failbit ; in fail error ; if fail is ; : )set;; 
  9659.  
  9660. fail ,. in;  error fail fail ; )set;: fail )set;; state it : ; 
  9661.  
  9662. error a a: int ; ) 
  9663.  
  9664. or failbit() either
  9665.  
  9666. failbit() a the it Otherwise::const.::const.const.::const.::const.const.in set 
  9667. nonzero int value returns. 0. 
  9668. Otherwise::const.::const.const.::const.::const.const.in set badbit if is colon 
  9669. fail error badbit ios . 
  9670.    ) set ; . badbit 
  9671. ,  :  the 0  :    . badbit 
  9672.  
  9673. failbit ; in fail error error(iffailerroris;:) set ;  )
  9674.  
  9675. ,.badbit
  9676. ,
  9677.  
  9678.  
  9679. ΓòÉΓòÉΓòÉ <hidden> n.colon.::colon.::colon.colon.failbit and ios::colon.::co ΓòÉΓòÉΓòÉ
  9680.  
  9681. . ( . badbit 
  9682. , value  the 0  : 
  9683. (  colon ) set ; : 
  9684. (  colon ) set ; . badbit 
  9685. ,  :  the 0  :   . badbit 
  9686.  
  9687. failbit ; in fail error ; if fail error is ; : )set;; 
  9688.  
  9689. fail ,. in; error fail fail ; )set;: fail )set;; it : ; 
  9690.  
  9691. error is ; : )set;; either error int const or nonzero ios Otherwise ; a a: int 
  9692. ; : 
  9693.  
  9694. int fail() const;
  9695.  
  9696. fail() returns a nonzero value if either ios::colon.::colon.colon.::colon.::. 
  9697. badbitorios : : colon . : : colon . colon . : : colon . : : colon . colon . 
  9698. failbitissetintheerrorstate .Otherwise ,itreturns0 .or returnsfail Otherwise  .(a
  9699.  
  9700. ,.badbit
  9701. , .badbit
  9702. ,value the0 :
  9703. ( colon)set;:
  9704. ( colon)set;.badbit
  9705. , : the0 :   .badbit
  9706.  
  9707. failbit ; in fail error  ;iffailerroris;:) set ; ;
  9708.  
  9709. fail ,. in; error ( fail fail  ;) set ; :fail) set ; ;stateit:;
  9710.  
  9711. error is ; : )set; ; either error int returns fail nonzero ios Otherwise ; a a: 
  9712. int ; : colon . colon  : colon . : : colon . colon . badbitorios : : colon . : 
  9713. : colon . colon . : : colon . : : colon . colon . failbitissetintheerrorstate 
  9714. .Otherwise ,itreturns0 . iffailbiterrornonzeroreturns.theset ,state: : : it . 
  9715. it . : : it . : : it . it . eithercolonbadbit fail:
  9716.  
  9717. .int(::it.::it.it.::it.: )
  9718.  
  9719. ,.badbit
  9720. , .badbit
  9721. ,value the0 : colon)set;:
  9722. ( colon)set;.badbit
  9723. , : the0 :  .badbit
  9724.  
  9725. failbit ; in fail error ; if fail is ; : )set;; 
  9726.  
  9727. fail ,. in;  error fail fail ; )set;: fail )set;; state it : ; 
  9728.  
  9729. error a a: int ; ) 
  9730.  
  9731. or failbit() either
  9732.  
  9733. failbit() a the it Otherwise::const.::const.const.::const.::const.const.in set 
  9734. nonzero int value returns. 0. 
  9735. Otherwise::const.::const.const.::const.::const.const.in set badbit if is colon 
  9736. fail error badbit ios . 
  9737.    ) set ; . badbit 
  9738. ,  :  the 0  :    . badbit 
  9739.  
  9740. failbit ; in fail error error(iffailerroris;:) set ;  )
  9741.  
  9742. ,.badbit
  9743. ,.(.badbit
  9744. ,value the0 :
  9745. ( colon)set;:
  9746. ( colon)set;.badbit
  9747. , : the0 :  .badbit
  9748.  
  9749. failbit ; in fail error ; if fail error is ; : )set;; 
  9750.  
  9751. fail ,. in; error fail fail ; )set;: fail )set;; it : ; 
  9752.  
  9753. error is ; : )set;; either error int const or nonzero ios Otherwise ; a a: int 
  9754. ; : 
  9755.  
  9756. int fail() const;
  9757.  
  9758. fail() returns a nonzero value if either ios::colon.::colon.colon.::colon.::. 
  9759. badbitorios : : colon . : : colon . colon . : : colon . : : colon . colon . 
  9760. failbitissetintheerrorstate .Otherwise ,itreturns0 .or returnsfail Otherwise  .(a
  9761.  
  9762. ,.badbit
  9763. , .badbit
  9764. ,value the0 :
  9765. ( colon)set;:
  9766. ( colon)set;.badbit
  9767. , : the0 :   .badbit
  9768.  
  9769. failbit ; in fail error  ;iffailerroris;:) set ; ;
  9770.  
  9771. fail ,. in; error ( fail fail  ;) set ; :fail) set ; ;stateit:;
  9772.  
  9773. error is ; : )set; ; either error int returns fail nonzero ios Otherwise ; a a: 
  9774. int ; 
  9775.  
  9776. ifstream();
  9777. ifstream(int d);
  9778. ifstream(const char* fname,
  9779.          int mode=ios&c2.in,
  9780.          int prot=filebuf&c2.openprot);
  9781. ifstream(int d, char* p, int len);
  9782.  
  9783. There are four versions of the ifstream constructor. The first version takes no 
  9784. arguments and constructs an unopened ifstream object. The second version takes 
  9785. one argument and constructs an ifstream object that is attached to the file 
  9786. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  9787. ifs. 
  9788.  
  9789. The third and fourth versions of the ifstream() constructor take three 
  9790. arguments. The third version constructs an ifstream object and opens the file 
  9791. fname with open mode equal to mode and protection mode equal to prot. The 
  9792. default value for mode is ios&c2.in, and the default value for prot is 
  9793. filebuf&c2.openprot. If the file cannot be opened, the error state of the 
  9794. constructed ifstream object is set. 
  9795.  
  9796. The fourth version constructs an ifstream object that is attached to the file 
  9797. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  9798. ifs. This constructor also sets up an associated filebuf object with a stream 
  9799. buffer that has length len bytes and begins at the position pointed to by p. If 
  9800. p is equal to 0 or len is equal to 0, the associated filebuf object is 
  9801. unbuffered. 
  9802.  
  9803. void clear(int state=0);
  9804.  
  9805. clear() changes the error state of iosobj to state. If state equals 0 (its 
  9806. default), all of the bits in the error state are cleared. If you want to set 
  9807. one of the bits without clearing the other bits in the error state, you can 
  9808. bitwise OR the bit you want to set with the current error state. For example, 
  9809. the following statement sets 
  9810. ios::colon.::colon.colon.::colon.::colon.colon.badbit in iosobj and leaves all 
  9811. the other error state bits unchanged: 
  9812.  
  9813. iosobj.clear(ios::colon.::colon.colon.::colon.::colon.colon.badbit|iosobj.rdstate());
  9814. clear its If error. int ios 0. equals::are.::are.are.::are.::are.are.changes 
  9815. example of iosobj OR all can clearing and bits bit all cleared in. 
  9816.    ) example ; . all 
  9817. with , you  iosobj :  For 0  :  you    . ( iosobj  . all 
  9818. with , If  For 0  sets : 
  9819. ( you  and | ) example ; without : 
  9820. ( you  and rdstate ) example ; . all 
  9821. with , you  iosobj :  For 0  :  you  . all 
  9822.  
  9823. bitwise the  with int; set changes bits ios bit with ; can bits ios bit with 
  9824. clearing other leaves iosobj; void iosobj : |)example;OR without statement 
  9825. want; 
  9826.  
  9827. bits to with,.  changes; ios bit with bits other sets of , . ( bits of ; its 
  9828. state |)example;without: bits its state rdstate)example;; void  colon : one in 
  9829. with ; 
  9830.  
  9831. to ios bit with clearing other leaves iosobj; void iosobj : |)example;OR 
  9832. without statement want; int badbit bit clear rdstate are default unchanged 
  9833. current cleared equals ; void of = of =: clear rdstate 
  9834.  
  9835. with,.all
  9836. with,you iosobj.all
  9837. with,If For0 sets:
  9838. (you and|)example;without:
  9839. (you andrdstate)example;.all
  9840. with,you iosobj: For0 : you  with , .intchanges ;iosbitsothersetsofbitsof ; its state |)example;without: bits its state  ) example ; ;voidotherfollowingcolon:oneinwith;
  9841.  
  9842. toiosbitwithclearingotherleavesiosobj ;voidiosobj:| ) example ; ORwithout want ;intbadbitbitclearrdstateare unchangederrorbitscurrentclearedequals;voidof=of= :clearrdstate; andrdstate)example;.all
  9843. with,you iosobj: For0 : you .all
  9844.  
  9845. bitwise the with int; set changes bits ios bit with ; can bits ios bit with 
  9846. clearing other leaves iosobj; void iosobj :| ) example ; ORwithoutstatementwant ;
  9847.  
  9848. bits to with,. int changes; ios bit with bits other sets of bits of ; its state 
  9849. |)example;without: bits its state rdstate)example;; void other following colon 
  9850. : one in with ; 
  9851.  
  9852. to ios bit with clearing other leaves iosobj; void iosobj : |)example;OR 
  9853. without statement , . 
  9854. ;intbadbitbitclearrdstatearedefaultunchangederrorbitscurrentclearedequals;voidof=of= :clearrdstate;,bit(
  9855.  
  9856. void clear(int state=0);
  9857.  
  9858. clear() changes the error state of iosobj to state. If state equals 0 (its 
  9859. default), all of the bits in the error state are cleared. If you want to set 
  9860. one of the bits without clearing the other bits in the error state, you can 
  9861. bitwise OR the bit you want to set with the current error state. For example, 
  9862. the following statement sets ios::colon.::colon.colon.:. : : colon . colon . 
  9863. badbitiniosobjandleavesalltheothererrorstatebitsunchanged :
  9864.  
  9865. iosobj.clear(ios::colon.::colon.colon.::colon.::colon.colon.badbit|iosobj.rdstate());
  9866. bit ( clear its If error. int ios 0. 
  9867. equals::are.::are.are.::are.::are.are.changes example of iosobj OR all can 
  9868. clearing and bits bit all cleared in. 
  9869.    ) example ; . all 
  9870. with , you  iosobj :  For 0  :  you  can bits ios bit with clearing other 
  9871. leaves iosobj; void iosobj : |)example;OR  without statement without ) 
  9872.  
  9873. with,.all
  9874. with,you  .(iosobjsets:
  9875. (you and|)example;without:
  9876. (you andrdstate)example;.all
  9877. with,you iosobj: For0 : you .all
  9878.  
  9879. bitwise the  with int; set changes bits ios bit with ; can bits ios bit with 
  9880. clearing other leaves iosobj; void iosobj : |)example;OR without statement 
  9881. want; 
  9882.  
  9883. bits to with,.  changes; ios bit with bits other sets of bit ( , . ( bits of ; 
  9884. its state |)example;without: bits its state rdstate)example;; void  colon : one 
  9885. in with ; 
  9886.  
  9887. to ios bit with clearing other leaves iosobj; void iosobj : |)example;OR 
  9888. without statement ( want; int badbit bit clear rdstate are default unchanged 
  9889. current cleared equals ; void of = of =: clear rdstate  ;:
  9890.  
  9891. clear bits() are;
  9892.  
  9893. bits() error = current If can badbit cleared::and.::and.and.::and.::and .all 
  9894. default cleared::and.::and.and.::and.::and.and.bitwise clearing example changes 
  9895. For bit following. equals, colon error 0. default  error bits  equals   . ( of 
  9896.  
  9897. ifstream();
  9898. ifstream(int d);
  9899. ifstream(const char* fname,
  9900.          int mode=ios&c2.in,
  9901.          int prot=filebuf&c2.openprot);
  9902. ifstream(int d, char* p, int len);
  9903.  
  9904. There are four versions of the ifstream constructor. The first version takes no 
  9905. arguments and constructs an unopened ifstream object. The second version takes 
  9906. one argument and constructs an ifstream object that is attached to the file 
  9907. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  9908. ifs. 
  9909.  
  9910. The third and fourth versions of the ifstream() constructor take three 
  9911. arguments. The third version constructs an ifstream object and opens the file 
  9912. fname with open mode equal to mode and protection mode equal to prot. The 
  9913. default value for mode is ios&c2.in, and the default value for prot is 
  9914. filebuf&c2.openprot. If the file cannot be opened, the error state of the 
  9915. constructed ifstream object is set. 
  9916.  
  9917. The fourth version constructs an ifstream object that is attached to the file 
  9918. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  9919. ifs. This constructor also sets up an associated filebuf object with a stream 
  9920. buffer that has length len bytes and begins at the position pointed to by p. If 
  9921. p is equal to 0 or len is equal to 0, the associated filebuf object is 
  9922. unbuffered. 
  9923.  
  9924. int eof() const;
  9925.  
  9926. eof() returns a nonzero value if 
  9927. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is set in the error state 
  9928. of iosobj. Otherwise, it returns 0. 
  9929. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is usually set when an 
  9930. EOF has been encountered during an extraction operation. .  :   . an 
  9931.  
  9932. eof Otherwise; eofbit encountered returns during ; EOF encountered returns 
  9933. during has the set; set during ( :) is ; when;
  9934.  
  9935. encountered ,. Otherwise 
  9936. ;returnsduringencounteredusuallyencounteredusually;state) is ; 
  9937. :encounteredstate) is ; ;itif:valueoperation;
  9938.  
  9939. returns during has the ( set; set : )is;when during(,. ; Otherwise const during 
  9940. error colon int iosobj encountered in extraction ios ; usually a usually a: 
  9941. error ; , during ( 
  9942.  
  9943. (Otherwise a0);
  9944.  
  9945. error() eofbit iosobj usually set . of ios 0 (state int), an usually 
  9946. encountered operation iosobj colon extraction. of value usually encountered has 
  9947. encountered operation iosobj , EOF eof when during in iosobj . nonzero is, it ) 
  9948. returns::if.::if.if.:during(.::if.if.const operation set been the an iosobj 
  9949. encountered : 
  9950.  
  9951. set.error(returns::if.::if.if.::if.::if.if.constset.());
  9952. during ( error state of iosobj. Otherwise returns 0. ios::colon.::colon.colon.. 
  9953. : : colon . colon . 
  9954. eofbitisusuallysetwhenanEOFhasbeenencounteredduringanextractionoperation .
  9955.    ) is ; . an 
  9956. ,  set :  nonzero 0  :   set; set : )is;when  ) 
  9957.  
  9958. ,.an
  9959. ,  .(set:
  9960. ( been)is;:
  9961. ( been)is;.an
  9962. , set: nonzero,.(:  .an
  9963.  
  9964. eof  Otherwise; eofbit encountered returns during ; EOF encountered returns 
  9965. during has the set; set : )is;when ; 
  9966.  
  9967. encountered ,.  eofbit; returns during encountered usually during ( , . ( 
  9968. encountered usually ; state )is;: encountered state )is;;  if : value operation 
  9969.  
  9970. returns during the set; set : )is;when const during error colon int  in 
  9971. extraction ios ; usually a usually a: error  ;
  9972.  
  9973. error encountered() colon;
  9974.  
  9975. encountered() iosobj a in of EOF const 
  9976. extraction::been.::been.been.::been.::been .an int 
  9977. extraction::been.::been.been.::been.::been.been.eof has is eofbit nonzero 
  9978. during it. ios, if iosobj 0. int  iosobj encountered  ios 
  9979.  
  9980. ,.an
  9981. , set.an
  9982. ,of nonzero0 :
  9983. ( been)is;:
  9984. ( been)is;.an
  9985. , set: nonzero0 :  .an
  9986.  
  9987. eof Otherwise; eofbit encountered returns during 
  9988. ;EOFencounteredreturnsduringhastheset ;set:) is ; when;
  9989.  
  9990. encountered ,. Otherwise eofbit; returns during encountered usually encountered 
  9991. usually ;state) is ; :encounteredstate) is ; ;itif:valueoperation;
  9992.  
  9993. returns during has the set; set : )is;when ; Otherwise const during error colon 
  9994. int iosobj encountered in extraction ios ; usually a usually a: error ; colon . 
  9995. : : colon . colon . eofbitissetintheerrorstateofiosobj .Otherwise ,itreturns0 
  9996. .ios : : colon . : : colon . colon . : : colon . : : colon . colon . 
  9997. eofbitisusuallysetwhenanEOFhasbeenencounteredduringanextractionoperation . . :  .an
  9998.  
  9999. eof Otherwise; eofbit encountered returns during ; EOF encountered returns 
  10000. during has the set; set during ( :) is ; when;
  10001.  
  10002. encountered ,. Otherwise  ;returnsduringencounteredusuallyencounteredusually; 
  10003. state )is;: encountered state )is;; it if : value operation ; 
  10004.  
  10005. returns during has the during ( , . 
  10006. ;Otherwiseconstduringerrorcolonintiosobjencounteredinextractionios;usuallyausuallya :error;,during(
  10007.  
  10008.  (Otherwise a0);
  10009.  
  10010. error() eofbit iosobj usually set ( . of ios 0 (state int), an usually 
  10011. encountered operation iosobj colon extraction. of value usually encountered has 
  10012. encountered operation iosobj , EOF eof when during in iosobj . nonzero is, it ) 
  10013. colon set . error ( returns : : if . : : if . if . : : if . : : if . if . const 
  10014. set . ( ) ) ; 
  10015. during ( error state of iosobj. Otherwise returns 0. 
  10016. ios::colon.::colon.colon.: .::colon.colon.eofbit is usually set when an EOF has 
  10017. been encountered during an extraction operation. 
  10018.   ) is ; . an 
  10019. ,  set :  nonzero 0  : 
  10020.  
  10021. ,.an
  10022. ,  .(set:
  10023. ( been)is;:
  10024. ( been)is;.an
  10025. , set: nonzero0 ,.(:  .an
  10026.  
  10027. eof  Otherwise; eofbit encountered returns during 
  10028. ;EOFencounteredreturnsduringhastheset ;set:) is ; when;
  10029.  
  10030. encountered ,. ;state) is ; :encounteredstate) is ; ; if:valueoperation;
  10031.  
  10032. returns during  the set; set : )is;when const during error colon int  in 
  10033. extraction ios ; usually a usually a: error  ;:
  10034.  
  10035. error encountered() colon;
  10036.  
  10037. encountered() iosobj a in of EOF const extraction::been.::been.: been . : : 
  10038. been  . anintextraction : : been . : : been . been . : : been . : : been . been 
  10039. . eofhasiseofbitnonzeroduringit .ios ,ifiosobj0 
  10040. .int iosobjencountered ios  .(usuallyausually: error   0 
  10041.  
  10042. ,.an
  10043. , set.an
  10044. ,of nonzero0 :
  10045. ( been)is;:
  10046. ( been)is;.an
  10047. , set: nonzero0 :  .an
  10048.  
  10049. eof Otherwise; eofbit encountered returns during 
  10050. ;EOFencounteredreturnsduringhastheset ;set:) is ; when;
  10051.  
  10052. encountered ,. Otherwise eofbit; returns during encountered usually encountered 
  10053. usually ;state) is ; :encounteredstate) is ; ;itif:valueoperation;
  10054.  
  10055. returns during has the set; set : )is;when ; Otherwise const during error colon 
  10056. int iosobj encountered in extraction ios ; usually a usually a: error ; colon . 
  10057. : : colon . colon . eofbitissetintheerrorstateofiosobj .Otherwise ,itreturns0 
  10058. .ios : : colon . : : colon . colon . : : colon . : : colon . colon . 
  10059. eofbitisusuallysetwhenanEOFhasbeenencounteredduringanextractionoperation . . :  .an
  10060.  
  10061. eof Otherwise; eofbit encountered returns during ; EOF encountered returns 
  10062. during has the set; set during ( :) is ; when;
  10063.  
  10064. encountered ,. Otherwise  ;returnsduringencounteredusuallyencounteredusually
  10065.  
  10066. ifstream();
  10067. ifstream(int d);
  10068. ifstream(const char* fname,
  10069.          int mode=ios&c2.in,
  10070.          int prot=filebuf&c2.openprot);
  10071. ifstream(int d, char* p, int len);
  10072.  
  10073. There are four versions of the ifstream constructor. The first version takes no 
  10074. arguments and constructs an unopened ifstream object. The second version takes 
  10075. one argument and constructs an ifstream object that is attached to the file 
  10076. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  10077. ifs. 
  10078.  
  10079. The third and fourth versions of the ifstream() constructor take three 
  10080. arguments. The third version constructs an ifstream object and opens the file 
  10081. fname with open mode equal to mode and protection mode equal to prot. The 
  10082. default value for mode is ios&c2.in, and the default value for prot is 
  10083. filebuf&c2.openprot. If the file cannot be opened, the error state of the 
  10084. constructed ifstream object is set. 
  10085.  
  10086. The fourth version constructs an ifstream object that is attached to the file 
  10087. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  10088. ifs. This constructor also sets up an associated filebuf object with a stream 
  10089. buffer that has length len bytes and begins at the position pointed to by p. If 
  10090. p is equal to 0 or len is equal to 0, the associated filebuf object is 
  10091. unbuffered. 
  10092.  
  10093. int fail() const;
  10094.  
  10095. fail() returns a nonzero value if either 
  10096. ios::colon.::colon.colon.::colon.::colon.colon.badbit or 
  10097. ios::colon.::colon.colon.::colon.::colon.colon.failbit is set in the error 
  10098. state. Otherwise, it returns 0. in fail error error(iffailerroris;:) set ; 
  10099.  
  10100. ,.badbit
  10101. ,  .(. :
  10102. ( colon)set;:
  10103. ( colon)set;.badbit
  10104. , : the0 ,.(:  .badbit
  10105.  
  10106. failbit  ; in fail error  ;if fail error is ; : )set;; 
  10107.  
  10108. fail ,. .  error ( , . ( fail  ;) set ; :fail) set ; ; it:;
  10109.  
  10110.  ; : )set; either error int const or  nonzero ios Otherwise ; a a: int  ;:
  10111.  
  10112. int fail() const;
  10113.  
  10114. fail() returns a nonzero value if either 
  10115. ios::colon.::colon.colon :colon.::colon .badbit or ios::colon.::colon: : colon 
  10116. . : : colon . colon . failbitissetintheerrorstate .Otherwise ,itreturns0 
  10117. .or returnsfail Otherwise  .(a: int   0 
  10118.  
  10119. ,.badbit
  10120. , .badbit
  10121. ,value the0 :
  10122. ( colon)set;:
  10123. ( colon)set;.badbit
  10124. , : the0 :   .badbit
  10125.  
  10126. failbit ; in fail error  ;iffailerroris;:) set ; ;
  10127.  
  10128. fail ,. in; error fail fail  ;) set ; :fail) set ; ;stateit:;
  10129.  
  10130. error is ; : )set; ; either error int returns fail nonzero ios Otherwise ; a a: 
  10131. int ; const . const .  const . : : const . const . insetnonzerointvaluereturns 
  10132. .,state0 .Otherwise : : const . : : const . const . : : const . : : const . 
  10133. const . insetbadbitifiscolonfailerrorbadbitios. . :   . badbit 
  10134.  
  10135. failbit ; in fail error ;  if fail error is ; error ( :) set ; ;
  10136.  
  10137. fail ,.  ;errorfailfail) 
  10138.  
  10139. ,.badbit
  10140. , .badbit
  10141. ,value the0 :
  10142. (
  10143.  
  10144.  
  10145. ΓòÉΓòÉΓòÉ <hidden> n.colon.::colon.::colon.colon.failbit and ios::colon.::co ΓòÉΓòÉΓòÉ
  10146.  
  10147. .  colon ) set ; : 
  10148. (  colon ) set ; . badbit 
  10149. ,  :  the 0  :   . badbit 
  10150.  
  10151. failbit ; in fail error ; if fail error is ; : )set;; 
  10152.  
  10153. fail ,. in; error fail .  fail ; )set;: fail )set;; state it : ; 
  10154.  
  10155. error is ;:) set ; ;eithererrorintconstorreturnsfailnonzeroiosOtherwise;aa: int 
  10156. ; : 
  10157.  
  10158. int fail() const;
  10159.  
  10160. fail() returns a nonzero value if either 
  10161. ios::colon.::colon.colon.::colon.::colon.colon.badbit or 
  10162. ios::colon.::colon.colon.::colon.::colon.colon.returns  is set in the error 
  10163. state. Otherwise, it returns 0.  in fail error error(iffailerroris;:) set ; 
  10164.  
  10165. ,.badbit
  10166. ,.( . :
  10167. ( colon)set;:
  10168. ( colon)set;.badbit
  10169. , : the0 ,.(:  .badbit
  10170.  
  10171. failbit ; in fail error  ; iffailerroris;:) set ; ;
  10172.  
  10173. fail ,. in; error fail  .  error ( , . ( fail  ;) set ; :fail) set ; ;it : ; 
  10174.  
  10175.   ; : )set; either error int const or nonzero ios Otherwise ; a a: int  ;:
  10176.  
  10177. int fail() const;
  10178.  
  10179. fail() returns a nonzero value if either ios::colon.::colon.colon :colon.::. 
  10180. badbitorios : : colon . : : colon .  : : colon . : : colon . colon . 
  10181. failbitissetintheerrorstate .Otherwise ,itreturns0 .or returnsfail Otherwise  .(a
  10182.  
  10183. ,.badbit
  10184. , .badbit
  10185. ,value the0 :
  10186. ( colon)set;:
  10187. ( colon)set;.badbit
  10188. , : the0 :   .badbit
  10189.  
  10190. failbit ; in fail error  ;iffailerroris;:) set ; ;
  10191.  
  10192. fail ,. in; error fail fail  ;) set ; :fail) set ; ;stateit:;
  10193.  
  10194. error is ; : )set; ; either error int returns fail nonzero ios Otherwise ; a a: 
  10195. int ; const . const .  const . : : const . const . insetnonzerointvaluereturns 
  10196. .,state0 .Otherwise : : const . : : const . const . : : const . : : const . 
  10197. const . insetbadbitifiscolonfailerrorbadbitios. . :   . badbit 
  10198.  
  10199. failbit ; in fail error ;  if fail error is ; error ( :) set ; ;
  10200.  
  10201. fail ,.  ;errorfailfail) 
  10202.  
  10203. ,.badbit
  10204. , .badbit
  10205. ,value the0 :
  10206. ( . colon)set;:
  10207. ( colon)set;.badbit
  10208. , : the0 :  .badbit
  10209.  
  10210. failbit ; in fail error ; if fail error is ; : )set;; 
  10211.  
  10212. fail ,. in; error fail .  fail ; )set;: fail )set;; state it : ; 
  10213.  
  10214. error is ;:) set ; ;eithererrorintconstorreturnsfailnonzeroiosOtherwise;aa: int 
  10215. ; : 
  10216.  
  10217. int fail() const;
  10218.  
  10219. fail() returns a nonzero value if either 
  10220. ios::colon.::colon.colon.::colon.::colon.colon.badbit or 
  10221. ios::colon.::colon.colon.::colon.::colon.colon.returns  is set in the error 
  10222. state. Otherwise, it returns 0.  in fail error error(iffailerroris;:) set ; 
  10223.  
  10224. ,.badbit
  10225. ,.( . :
  10226. ( colon)set;:
  10227. ( colon)set;.badbit
  10228. , : the0 ,.(:  .badbit
  10229.  
  10230. failbit ; in fail error  ; iffailerroris;:) set ; ;
  10231.  
  10232. fail ,. in; error fail  .  error ( , . ( fail  ;) set ; :fail) set ; ;it : ; 
  10233.  
  10234.   ; : )set; either error int const or nonzero ios Otherwise ; a a: int  ;:
  10235.  
  10236. int fail() const;
  10237.  
  10238. fail() returns a nonzero value if either ios::colon.::colon.colon :colon.::
  10239.  
  10240. ifstream();
  10241. ifstream(int d);
  10242. ifstream(const char* fname,
  10243.          int mode=ios&c2.in,
  10244.          int prot=filebuf&c2.openprot);
  10245. ifstream(int d, char* p, int len);
  10246.  
  10247. There are four versions of the ifstream constructor. The first version takes no 
  10248. arguments and constructs an unopened ifstream object. The second version takes 
  10249. one argument and constructs an ifstream object that is attached to the file 
  10250. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  10251. ifs. 
  10252.  
  10253. The third and fourth versions of the ifstream() constructor take three 
  10254. arguments. The third version constructs an ifstream object and opens the file 
  10255. fname with open mode equal to mode and protection mode equal to prot. The 
  10256. default value for mode is ios&c2.in, and the default value for prot is 
  10257. filebuf&c2.openprot. If the file cannot be opened, the error state of the 
  10258. constructed ifstream object is set. 
  10259.  
  10260. The fourth version constructs an ifstream object that is attached to the file 
  10261. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  10262. ifs. This constructor also sets up an associated filebuf object with a stream 
  10263. buffer that has length len bytes and begins at the position pointed to by p. If 
  10264. p is equal to 0 or len is equal to 0, the associated filebuf object is 
  10265. unbuffered. 
  10266.  
  10267. void clear(int state=0);
  10268.  
  10269. clear() changes the error state of iosobj to state. If state equals 0 (its 
  10270. default), all of the bits in the error state are cleared. If you want to set 
  10271. one of the bits without clearing the other bits in the error state, you can 
  10272. bitwise OR the bit you want to set with the current error state. For example, 
  10273. the following statement sets 
  10274. ios::colon.::colon.colon.::colon.::colon.colon.badbit in iosobj and leaves all 
  10275. the other error state bits unchanged: 
  10276.  
  10277. iosobj.clear(ios::colon.::colon.colon.::colon.::colon.colon.badbit|iosobj.rdstate());
  10278. want; 
  10279.  
  10280. bits to  with,. int  ;iosbitwithbitsothersetsofbitsof) 
  10281.  
  10282. with,.all
  10283. with,you iosobj.all
  10284. with,If For0 sets:
  10285. (you  . and|)example;without:
  10286. (you andrdstate)example;.all
  10287. with,you iosobj: For0 : you .all
  10288.  
  10289. bitwise the with int; set changes bits ios bit with ; can bits ios bit with 
  10290. clearing  ;voidiosobj:| ) example ; ORwithoutstatementwant ;
  10291.  
  10292. bits to with,. int changes; ios bit with bits other sets of  .  bits of ; its 
  10293. state |)example;without: bits its state rdstate)example;; void other following 
  10294. colon : one in with ; 
  10295.  
  10296. to ios bit with clearing other leaves  iosobj ;voidiosobj:| ) 
  10297. ORwithoutstatementwant 
  10298. ;intbadbitbitclearrdstatearedefaultunchangederrorbitscurrentclearedequals;voidof=of= :clearrdstate;:
  10299.  
  10300. clear bits() are;
  10301.  
  10302. bits() error = current If can badbit cleared::and.::and.and.::and.::and.and.all 
  10303. default cleared::and.::and.and.::and.::and.and.bitwise  error  clearing example 
  10304. changes For bit following. equals, colon error 0.  changes bits ios bit with 
  10305. bit(canbitsiosbitwithclearingotherleaves;voidiosobj:| ) example ; OR withoutstatement
  10306.  
  10307. with,.all
  10308. with,you  .(iosobjsets . :
  10309. (you and|)example;without:
  10310. (you andrdstate)example;.all
  10311. with,you iosobj: For0 ,.(: you .all
  10312.  
  10313. bitwise the  with int; set changes bits ios bit with 
  10314. ; canbitsiosbitwithclearingotherleavesiosobj ;voidiosobj:| ) example ; 
  10315. ORstatement want; 
  10316.  
  10317. bits to with,.  other leaves iosobj; void iosobj : |)example;OR without  badbit 
  10318. bit clear rdstate are default  current cleared equals ; void of = of =: clear 
  10319. rdstate  ;:
  10320.  
  10321. clear bits() are;
  10322.  
  10323. bits() error = current If can badbit cleared::and.::and.and :and.::and .all 
  10324. default cleared::and.::and. ::and.::and.and.bitwise clearing example changes 
  10325. For bit following. equals, colon error 0. default  error bits  equals   . ( of 
  10326. = of  :clearrdstate|
  10327.  
  10328. with,.all
  10329. with,you iosobj.all
  10330. with,If For0 sets:
  10331. (you and|)example;without:
  10332. (you andrdstate)example;.all
  10333. with,you iosobj: For0 : you .all
  10334.  
  10335. bitwise the with int; set changes bits ios bit with ; can bits ios bit with 
  10336. clearing other leaves iosobj; void iosobj : |)example;OR without statement 
  10337. want; 
  10338.  
  10339. bits to with,. int changes; ios bits other sets of bits of ; its state 
  10340. |)example;without: bits its state rdstate)example;; void other following colon 
  10341. : one in with ; 
  10342.  
  10343. to ios bit with clearing other leaves iosobj; void iosobj : |)example;OR 
  10344. without statement want; int badbit bit clear rdstate are default unchanged 
  10345. error bits current cleared equals ; void of = of =: clear rdstate ; . ( state = 
  10346. 0 ) ; 
  10347.  
  10348. clear() changes the error state of iosobj to state. If state equals 0 (its 
  10349. default), all of the bits in the error state are cleared. If you want to set 
  10350. one of the bits without clearing the other bits in the error state, you can 
  10351. bitwise OR the bit you want to set with the current error state. For example, 
  10352. the following statement sets 
  10353. ios::colon.::colon.colon.::colon.::colon.colon.badbit in iosobj and leaves all 
  10354. the other error state bits unchanged: 
  10355.  
  10356. iosobj.clear(ios::colon.::colon.colon.::colon.::colon.badbit|iosobj.rdstate());
  10357. bit ( want; 
  10358.  
  10359. bits to  with,. int  ;iosbitwithbitsothersetsofbitsof) 
  10360.  
  10361. with,.all
  10362. with,you iosobj.all
  10363. with,If For0 sets:
  10364. (you  . and|)example;without:
  10365. (you andrdstate)example;.all
  10366. with,you iosobj: For0 : you .all
  10367.  
  10368. bitwise the with int; set changes bits ios bit with can bits ios bit with 
  10369. clearing  bit ( ;voidiosobj:| ) example ; ORwithoutstatementwant ;
  10370.  
  10371. bits to with,. int changes; ios bit with bits other sets of  .  bits of ; its 
  10372. state |)example;without: bits its state rdstate)example;; void other following 
  10373. colon : one in with ; 
  10374.  
  10375. to ios bit with clearing other leaves  iosobj iosobj : |)bit(OR without 
  10376. statement want; int badbit bit clear rdstate are default unchanged error bits 
  10377. current cleared equals ; void of = of =: clear rdstate ; : 
  10378.  
  10379. clear bits() are;
  10380.  
  10381. bits() error = current If can badbit cleared::and.::and.and.::and.::and.and.all 
  10382. default cleared::and.::and.and.::and.::and.and.bitwise  error  clearing example 
  10383. changes For bit following. equals, colon error 0.  changes bits ios bit with 
  10384.  
  10385. ifstream();
  10386. ifstream(int d);
  10387. ifstream(const char* fname,
  10388.          int mode=ios&c2.in,
  10389.          int prot=filebuf&c2.openprot);
  10390. ifstream(int d, char* p, int len);
  10391.  
  10392. There are four versions of the ifstream constructor. The first version takes no 
  10393. arguments and constructs an unopened ifstream object. The second version takes 
  10394. one argument and constructs an ifstream object that is attached to the file 
  10395. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  10396. ifs. 
  10397.  
  10398. The third and fourth versions of the ifstream() constructor take three 
  10399. arguments. The third version constructs an ifstream object and opens the file 
  10400. fname with open mode equal to mode and protection mode equal to prot. The 
  10401. default value for mode is ios&c2.in, and the default value for prot is 
  10402. filebuf&c2.openprot. If the file cannot be opened, the error state of the 
  10403. constructed ifstream object is set. 
  10404.  
  10405. The fourth version constructs an ifstream object that is attached to the file 
  10406. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  10407. ifs. This constructor also sets up an associated filebuf object with a stream 
  10408. buffer that has length len bytes and begins at the position pointed to by p. If 
  10409. p is equal to 0 or len is equal to 0, the associated filebuf object is 
  10410. unbuffered. 
  10411.  
  10412. int eof() const;
  10413.  
  10414. eof() returns a nonzero value if 
  10415. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is set in the error state 
  10416. of iosobj. Otherwise, it returns 0. 
  10417. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is usually set when an 
  10418. EOF has been encountered during an extraction operation. been .  : : been . : : 
  10419. been . been . eofhasiseofbitnonzeroduringit .ios ,ifiosobj0 
  10420. .int iosobjencountered ios  .(usuallyausually: error   0  , iosobj ) 0an ; been ;if 0eofbit
  10421.  
  10422. ,.an
  10423. , set.an
  10424. ,of nonzero0 :
  10425. ( been)is;:
  10426. ( been)is;.an
  10427. , set: nonzero0 :  .an
  10428.  
  10429. eof Otherwise; eofbit encountered returns during 
  10430. ;EOFencounteredreturnsduringhastheset ;set:) is ; when;
  10431.  
  10432. encountered ,. Otherwise eofbit; returns during ( encountered usually 
  10433. encountered usually ;state) is ; :encounteredstate) is ; ;itif:valueoperation;
  10434.  
  10435. returns during has the set; set : )is;when ; Otherwise const during error colon 
  10436. int iosobj encountered in extraction ios ; usually a usually a: error ; . ( a 0 
  10437. ) ; 
  10438.  
  10439. error() eofbit iosobj usually .  . of ios 0 (state int), an usually encountered 
  10440. operation iosobj colon extraction. of value usually encountered has encountered 
  10441. operation iosobj , EOF eof when during in iosobj . nonzero is, it 
  10442. returns::if.::if.if.::if.::if.if.const operation set been the an encountered : 
  10443.  
  10444. set.error(returns::if.::if.if.::if.::ifduring(.constset.());
  10445. during ( ; 
  10446.  
  10447. encountered  ,. Otherwise  ;returnsduringencounteredusuallyencounteredusually
  10448.  
  10449. ,.an
  10450. , set.an
  10451. ,of nonzero0 :
  10452. (  . been)is;:
  10453. ( been)is;.an
  10454. , set: nonzero0 :  .an
  10455.  
  10456. eof Otherwise; eofbit encountered returns during during ( EOF encountered 
  10457. returns during has  during ( ;set:) is ; when;
  10458.  
  10459. encountered ,. Otherwise eofbit; returns during encountered usually  . 
  10460. encountered usually ;state) is ; :encounteredstate) is ; ;itif:valueoperation;
  10461.  
  10462. returns during has the  set during(set:) during ( when; Otherwise const during 
  10463. error colon int iosobj encountered in extraction ios ; usually a usually a: 
  10464. error ; : 
  10465.  
  10466. error encountered() colon;
  10467.  
  10468. encountered() iosobj a in of EOF const extraction::been.::been.: been . : : 
  10469. been . been . anintextraction : : been . : : been . been . : : been . : : been 
  10470. . been . eof iosobj hasiseofbitnonzeroduringit .ios ,ifiosobj0 
  10471. . eofbitencounteredreturnsduring) 
  10472.  
  10473. ,.an
  10474. , set.an
  10475. ,of nonzero0 :
  10476. ( been)is;:
  10477. ( been)is;.an
  10478. , set: nonzero0 :  .an
  10479.  
  10480. eof Otherwise; eofbit encountered returns during ; EOF encountered returns 
  10481. during has the set; set : )is;when ; 
  10482.  
  10483. encountered ,. Otherwise eofbit; returns during encountered usually encountered 
  10484. usually ; state )is;: encountered state )is;; :valueoperation;
  10485.  
  10486. returns during has the set; set : )is;when ; Otherwise const during error colon 
  10487. int iosobj encountered in extraction ios ; usually usually a: error ; int 
  10488.  
  10489. int eof() const;
  10490.  
  10491. eof() returns a nonzero value if 
  10492. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is set in the error state 
  10493. of iosobj. Otherwise, it returns 0. 
  10494. ios::colon.::colon.colon.::colon.::colon.colon.eofbit  is usually set when an 
  10495. EOF has been encountered during an extraction operation. .  been .  : : been . 
  10496. : : been . been . eofhasiseofbitnonzeroduringit .ios ,ifiosobj0 
  10497. .int iosobjencountered ios  .(usuallyausually: error   0 
  10498.  
  10499. ,.an
  10500. , set.an
  10501. ,of nonzero0 :
  10502. ( been)is;:
  10503. ( been)is;.an
  10504. , set: nonzero0 :  .an
  10505.  
  10506. eof Otherwise; eofbit encountered returns during 
  10507. ;EOFencounteredreturnsduringhastheset ;set:) is ; when;
  10508.  
  10509. encountered ,. Otherwise eofbit; returns during ( encountered usually 
  10510. encountered usually ;state) is ; :encounteredstate) is ; ;itif:valueoperation;
  10511.  
  10512. returns during has the set; set : )is;when ; Otherwise const during error colon 
  10513. int iosobj encountered in extraction ios ; usually a usually a: error ; . ( a 0 
  10514. ) ; 
  10515.  
  10516. error() eofbit iosobj usually .  . of ios 0 (state int), an usually encountered 
  10517. operation iosobj colon extraction. of value usually encountered has encountered 
  10518. operation iosobj , EOF eof when during in iosobj . nonzero is, it 
  10519. returns::if.::if.if.::if.::if.if.const operation set been the an encountered : 
  10520.  
  10521. set.error(returns::if.::if.if.::if.::ifduring(.constset.());
  10522. during ( ; 
  10523.  
  10524. encountered  ,. Otherwise  ;returnsduringencounteredusuallyencounteredusually
  10525.  
  10526. ,.an
  10527. , set.an
  10528. ,of nonzero0 :
  10529. (  . been)is;:
  10530. ( been)is;.an
  10531. , set: nonzero0 :  .an
  10532.  
  10533. eof Otherwise; eofbit encountered returns during during ( EOF encountered 
  10534. returns during has  during ( ;set:) is ; when;
  10535.  
  10536. encountered ,. Otherwise eofbit; returns during encountered usually  . 
  10537. encountered usually ;state) is ; :encounteredstate) is ; ;itif:valueoperation;
  10538.  
  10539. returns during has the  set during(set:) during ( when; Otherwise const during 
  10540. error colon int iosobj encountered in extraction ios ; usually a usually a: 
  10541. error ; : 
  10542.  
  10543. error encountered() colon;
  10544.  
  10545. encountered() iosobj a in of EOF const extraction::been.::been.: been . : : 
  10546. been . been . anintextraction : : been . : : been . been . : : been . : : been 
  10547. . been . eof iosobj hasiseofbitnonzeroduringit .ios ,ifiosobj0 
  10548. . eofbitencounteredreturnsduring) 
  10549.  
  10550. ,.an
  10551. , set.an
  10552. ,of nonzero0 :
  10553. ( been)is;:
  10554. ( been)is;.an
  10555. , set: nonzero0 :  .an
  10556.  
  10557. eof Otherwise; eofbit encountered returns during ; EOF encountered returns 
  10558. during has the set; set : )is;when ; 
  10559.  
  10560. encountered ,. Otherwise eofbit; returns during encountered usually encountered 
  10561. usually ; state )is;: encountered state )is;; :valueoperation;
  10562.  
  10563. returns during has the set; set : )is;when ; Otherwise const during error colon 
  10564. int iosobj encountered in extraction ios ; usually usually a: error ; int 
  10565.  
  10566. int eof() const;
  10567.  
  10568. eof() returns a nonzero value if 
  10569. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is set in the error state 
  10570. of iosobj. Otherwise, it returns 0. 
  10571. ios::colon.::colon.colon.::colon.::colon.colon.eofbit  is usually set when an 
  10572. EOF has been encountered during an extraction operation. .  been .  : : been . 
  10573. : : been . been . eofhasiseofbitnonzeroduringit .ios ,ifiosobj0 
  10574. .int iosobjencountered ios  .(usuallyausually: error   0 
  10575.  
  10576. ifstream();
  10577. ifstream(int d);
  10578. ifstream(const char* fname,
  10579.          int mode=ios&c2.in,
  10580.          int prot=filebuf&c2.openprot);
  10581. ifstream(int d, char* p, int len);
  10582.  
  10583. There are four versions of the ifstream constructor. The first version takes no 
  10584. arguments and constructs an unopened ifstream object. The second version takes 
  10585. one argument and constructs an ifstream object that is attached to the file 
  10586. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  10587. ifs. 
  10588.  
  10589. The third and fourth versions of the ifstream() constructor take three 
  10590. arguments. The third version constructs an ifstream object and opens the file 
  10591. fname with open mode equal to mode and protection mode equal to prot. The 
  10592. default value for mode is ios&c2.in, and the default value for prot is 
  10593. filebuf&c2.openprot. If the file cannot be opened, the error state of the 
  10594. constructed ifstream object is set. 
  10595.  
  10596. The fourth version constructs an ifstream object that is attached to the file 
  10597. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  10598. ifs. This constructor also sets up an associated filebuf object with a stream 
  10599. buffer that has length len bytes and begins at the position pointed to by p. If 
  10600. p is equal to 0 or len is equal to 0, the associated filebuf object is 
  10601. unbuffered. 
  10602.  
  10603. int fail() const;
  10604.  
  10605. fail() returns a nonzero value if either 
  10606. ios::colon.::colon.colon.::colon.::colon.colon.badbit or 
  10607. ios::colon.::colon.colon.::colon.::colon.colon.failbit is set in the error 
  10608. state. Otherwise, it returns 0. if failbit error nonzero returns . the set, 
  10609. state ::it.::it.it.::it.::it.it.either colon badbit  fail : 
  10610.  
  10611. .int(::it.::it.it.::it.error(.either.());
  10612. error ( ; 
  10613.  
  10614. fail  ,.  ;errorfailfail
  10615.  
  10616. badbit
  10617. , .badbit
  10618. ,value the0 :
  10619. (  . colon)set;:
  10620. ( colon)set;.badbit
  10621. , : the0 :  .badbiteither
  10622.  
  10623. failbit;infailerror error(iffailerroris error(; : )set;;
  10624.  
  10625. fail,. in; error fail  .  fail  ;) set ; :fail) set ; returns ; state it : ;
  10626.  
  10627. erroris error ( : )error( ; either error int const or (returnsfailnonzeroiosOtherwise;aa :int;:
  10628.  
  10629. int fail() const;
  10630.  
  10631. fail() returns a nonzero value if either ios::colon.::colon.: colon . : : colon 
  10632. . colon . badbitorios : : colon . : : colon . colon . : : colon . : : colon . 
  10633. colon . failbit returns issetintheerrorstate .Otherwise ,itreturns0 
  10634. . infailerror) 
  10635.  
  10636. ,.badbit
  10637. , .badbit
  10638. ,value the0 ( colon)set;:
  10639. ( colon)set;.badbit
  10640. , : the0 :  .badbit
  10641.  
  10642. failbit ; in fail error ; error is ; : )set;; 
  10643.  
  10644. fail ,. in; error fail fail ; )set;: fail )set;; state  :;
  10645.  
  10646. error is ; : )set;; either error int const or returns fail nonzero ios 
  10647. Otherwise ;   a: int ; or 
  10648.  
  10649. or failbit() either;
  10650.  
  10651. failbit() a the it Otherwise::const.::const.const.::const.::const.const.in set 
  10652. nonzero int value returns. , state 0. 
  10653. Otherwise::const.::const.const.::const.::const.const.in 
  10654.  
  10655. ,.badbit
  10656. , .badbit
  10657. ,value the0 :
  10658. ( colon)set;:
  10659. ( colon)set;.badbit
  10660. , : the0 :
  10661.  
  10662.  
  10663. ΓòÉΓòÉΓòÉ <hidden> n.colon.::colon.::colon.colon.failbit and ios::colon.::co ΓòÉΓòÉΓòÉ
  10664.  
  10665.  . badbit 
  10666.  
  10667. failbit ; in fail error ; if fail error is ; : )set;; 
  10668.  
  10669. fail ,. in; error fail fail ; )set;: fail ) set ; ;stateit:;
  10670.  
  10671. error is ; : )set;; either error int returns fail nonzero ios Otherwise ; a a: 
  10672. int ; : colon . colon . : : colon . : : colon . colon . badbitorios : : colon . 
  10673. : : colon . colon . : : colon . : : colon . colon . failbitissetintheerrorstate 
  10674. .Otherwise ,itreturns0 . iffailbiterrornonzeroreturns.theset ,state: : : it . 
  10675. it . : : it . : : it . it . eithercolonbadbit fail:
  10676.  
  10677. .int(::it.::it.it.::it.: error(.either.());
  10678. error ( ; 
  10679.  
  10680. fail ,.  ;errorfailfail
  10681.  
  10682.  badbit
  10683. , .badbit
  10684. ,value the0 :
  10685. ( . colon)set;:
  10686. ( colon)set;.badbit
  10687. , : the0 :  .badbit
  10688.  either
  10689.  
  10690. failbit;infailerror error(iffailerroriserror(; : )set;;
  10691.  
  10692. fail ,. in; error fail . fail ; )set;: fail )set; returns ; state it : ;
  10693.  
  10694. erroriserror ( : )error( ; either error int const or a :int;:
  10695.  
  10696. int fail() const;
  10697.  
  10698. fail() returns a nonzero value if either 
  10699. ios::colon.::colon.colon :colon.::colon.colon.badbit or 
  10700. ios::colon.::colon.colon.::colon.::colon.colon.returns  is set in the error 
  10701. state. Otherwise, it returns 0.  in fail error )
  10702.  
  10703. ,.badbit
  10704. , .badbit
  10705. ,value the0  ( colon)set;:
  10706. ( colon)set;.badbit
  10707. ,,.(: the0 :  .badbit
  10708.  
  10709. failbit ; in fail error ; if  error is ; : ; ;
  10710.  
  10711. fail ,. in; error fail  fail ; ) )set;: fail )set;; state  :;
  10712.  
  10713. error  is ; : )set;returns  ; either error int const or returns fail nonzero 
  10714. ios Otherwise ; 
  10715.  
  10716. failbit() a the it Otherwise::const.::const.const.::const.::const.const.in set 
  10717. nonzero int value returns.  ,state0 .Otherwise : : const . : : const . const . 
  10718. : : const . : : const . const . inreturns ) if is colon fail error badbit ios . 
  10719. .  colon .  : : colon . : : colon . colon . failbitissetintheerrorstate 
  10720. .Otherwise ,itreturns0 .or returnsfail Otherwise  .(a
  10721.  
  10722. ,.badbit
  10723. , .badbit
  10724. ,value the0 :
  10725. ( colon)set;:
  10726. ( colon)set;.badbit
  10727. , : the0 :   .badbit
  10728.  
  10729. failbit ; in fail error ; if fail error is ; : )set;; 
  10730.  
  10731. fail ,. in; error fail fail ; )set;: fail ) set ; ;stateit:;
  10732.  
  10733. error is ; : )set;; either error int returns fail nonzero ios Otherwise ; a a: 
  10734. int ; : colon . colon . : : colon . : : colon . colon . badbitorios : : colon . 
  10735. : : colon . colon . : : colon . : : colon . colon . failbitissetintheerrorstate 
  10736. .Otherwise ,itreturns0 . iffailbiterrornonzeroreturns.theset ,state: : : it . 
  10737. it . : : it . : : it . it . eithercolonbadbit fail:
  10738.  
  10739. .int(::it.::it.it.::it.: error(.either.());
  10740. error ( ; 
  10741.  
  10742. fail ,.  ;errorfailfail
  10743.  
  10744.  badbit
  10745. , .badbit
  10746. ,value the0 :
  10747. ( . colon)set;:
  10748. ( colon)set;.badbit
  10749. , : the0 :  .badbit
  10750.  either
  10751.  
  10752. failbit;infailerror error(iffailerroriserror(; : )set;;
  10753.  
  10754. fail ,. in; error fail . fail ; )set;: fail )set; returns ; state it : ;
  10755.  
  10756. erroriserror ( : )error( ; either error int const or
  10757.  
  10758. ifstream();
  10759. ifstream(int d);
  10760. ifstream(const char* fname,
  10761.          int mode=ios&c2.in,
  10762.          int prot=filebuf&c2.openprot);
  10763. ifstream(int d, char* p, int len);
  10764.  
  10765. There are four versions of the ifstream constructor. The first version takes no 
  10766. arguments and constructs an unopened ifstream object. The second version takes 
  10767. one argument and constructs an ifstream object that is attached to the file 
  10768. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  10769. ifs. 
  10770.  
  10771. The third and fourth versions of the ifstream() constructor take three 
  10772. arguments. The third version constructs an ifstream object and opens the file 
  10773. fname with open mode equal to mode and protection mode equal to prot. The 
  10774. default value for mode is ios&c2.in, and the default value for prot is 
  10775. filebuf&c2.openprot. If the file cannot be opened, the error state of the 
  10776. constructed ifstream object is set. 
  10777.  
  10778. The fourth version constructs an ifstream object that is attached to the file 
  10779. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  10780. ifs. This constructor also sets up an associated filebuf object with a stream 
  10781. buffer that has length len bytes and begins at the position pointed to by p. If 
  10782. p is equal to 0 or len is equal to 0, the associated filebuf object is 
  10783. unbuffered. 
  10784.  
  10785. void clear(int state=0);
  10786.  
  10787. clear() changes the error state of iosobj to state. If state equals 0 (its 
  10788. default), all of the bits in the error state are cleared. If you want to set 
  10789. one of the bits without clearing the other bits in the error state, you can 
  10790. bitwise OR the bit you want to set with the current error state. For example, 
  10791. the following statement sets 
  10792. ios::colon.::colon.colon.::colon.::colon.colon.badbit in iosobj and leaves all 
  10793. the other error state bits unchanged: 
  10794.  
  10795. iosobj.clear(ios::colon.::colon.colon.::colon.::colon.colon.badbit|iosobj.rdstate());
  10796.  
  10797. with,.all
  10798. with,you iosobj.all
  10799. with,If For0 sets:
  10800. (you and|)example;without:
  10801. (you andrdstate)example;.all
  10802. with,you iosobj: For0 : you  with , .intchanges ;iosbitsothersetsofbitsof;itsstate| ) example ; without :bitsitsstate )example;; void other following colon : one in with ;
  10803.  
  10804. toiosbitwithclearingotherleavesiosobj ;voidiosobj:| ) example ; ORwithoutstatementwant ;intbadbitbitclearrdstateare unchangederrorbitscurrentclearedequals;voidof=of= :clearrdstate;state youcanbitwiseORthebityouwanttosetwiththecurrenterrorstate .Forexample ,thefollowingstatementsetsios : : colon  : colon . colon . : : colon . : : colon . colon . badbitiniosobjandleavesalltheother bitsunchanged :
  10805.  
  10806. iosobj.clear(ios::colon.::colon.colon.::colon.: .badbit|iosobj.rdstate());
  10807. bit ( want; 
  10808.  
  10809. bits to  with,. int  ;iosbitwithbitsothersetsofbitsof
  10810.  
  10811. with all
  10812. with,you iosobj.all
  10813. with,If For0 sets:
  10814. (you  . and|)example;without:
  10815. (you andrdstate)example;.all
  10816. with,you iosobj: For0 : you .all
  10817.  badbit
  10818.  
  10819. bitwisethewithint ;setchangesbitsiosbitwith canbitsiosbitwithclearing bit(; void iosobj : |)example;OR without statement want;
  10820.  
  10821. bitsto ,. int changes; ios bit with bits other sets of  .  bits of  ;itsstate| ) example ; without :bitsitsstaterdstate ) example ;  error  ;voidotherfollowingcolon:oneinwith;
  10822.  
  10823. toiosbitwithclearingotherleaves iosobjiosobj:| ) bit ( ORwithout want ;intbadbitbitclearrdstatearedefaultunchanged andrdstate)example;.all
  10824. with,you iosobj: For0 : you .all
  10825.  
  10826. bitwise the with int; set changes bits ios bit with can bits ios bit with 
  10827. clearing other leaves iosobj; void iosobj : |)example;OR without statement 
  10828. want; 
  10829.  
  10830. bits to with,. int changes; ios bit with bits other sets of bits of ; its state 
  10831. |)example;without: bits its state rdstate)example;; void other following colon 
  10832. : one in with ; 
  10833.  
  10834. to ios bit with clearing other leaves iosobjiosobj : |)example;OR without 
  10835. statement want; int badbit bit clear rdstate are default unchanged error bits 
  10836. current cleared equals ; void of = of =: clear rdstate ; bit ( 
  10837.  
  10838. void clear(int state=0);
  10839.  
  10840. clear() changes the error state of iosobj to state. If state equals 0 (its 
  10841. default), all of the bits in the error state are cleared. If you want to set 
  10842. one of the bits without clearing the other bits in the error state, you can 
  10843. bitwise OR error  the bit you want to set with the current error state. For 
  10844. example, the following statement sets 
  10845. ios::colon.::colon.colon.::colon.::colon.colon.badbit in iosobj and leaves all 
  10846. the other error state bits unchanged: 
  10847.  
  10848. iosobj.clear(ios::colon.::colon.colon.::colon.::colon.colon.badbit|iosobj.rdstate());
  10849.  . : : are . are . changes
  10850.  
  10851. with,.all
  10852. with,you iosobj.all
  10853. with,If For0 sets:
  10854. (you and|)example;without:
  10855. (you andrdstate)example;.all
  10856. with,you iosobj: For0 : you  with , .intchanges ;iosbitsothersetsofbitsof;itsstate| ) example ; without :bitsitsstate )example;; void other following colon : one in with ;
  10857.  
  10858. toiosbitwithclearingotherleavesiosobj ;voidiosobj:| ) example ; ORwithoutstatementwant ;intbadbitbitclearrdstateare unchangederrorbitscurrentclearedequals;voidof=of= :clearrdstate;state youcanbitwiseORthebityouwanttosetwiththecurrenterrorstate .Forexample ,thefollowingstatementsetsios : : colon  : colon . colon . : : colon . : : colon . colon . badbitiniosobjandleavesalltheother bitsunchanged :
  10859.  
  10860. iosobj.clear(ios::colon.::colon.colon.::colon.:
  10861.  
  10862. ifstream();
  10863. ifstream(int d);
  10864. ifstream(const char* fname,
  10865.          int mode=ios&c2.in,
  10866.          int prot=filebuf&c2.openprot);
  10867. ifstream(int d, char* p, int len);
  10868.  
  10869. There are four versions of the ifstream constructor. The first version takes no 
  10870. arguments and constructs an unopened ifstream object. The second version takes 
  10871. one argument and constructs an ifstream object that is attached to the file 
  10872. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  10873. ifs. 
  10874.  
  10875. The third and fourth versions of the ifstream() constructor take three 
  10876. arguments. The third version constructs an ifstream object and opens the file 
  10877. fname with open mode equal to mode and protection mode equal to prot. The 
  10878. default value for mode is ios&c2.in, and the default value for prot is 
  10879. filebuf&c2.openprot. If the file cannot be opened, the error state of the 
  10880. constructed ifstream object is set. 
  10881.  
  10882. The fourth version constructs an ifstream object that is attached to the file 
  10883. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  10884. ifs. This constructor also sets up an associated filebuf object with a stream 
  10885. buffer that has length len bytes and begins at the position pointed to by p. If 
  10886. p is equal to 0 or len is equal to 0, the associated filebuf object is 
  10887. unbuffered. 
  10888.  
  10889. int eof() const;
  10890.  
  10891. eof() returns a nonzero value if 
  10892. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is set in the error state 
  10893. of iosobj. Otherwise, it returns 0. 
  10894. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is usually set when an 
  10895. EOF has been encountered during an extraction operation.  been ) is ; . an 
  10896. ,  set :  nonzero 0  :   . an 
  10897.  
  10898. eof Otherwise; eofbit encountered returns during 
  10899. during(EOFencounteredreturnsduringhastheset ;set:) is ; when; 
  10900.  
  10901. encountered ,. Otherwise eofbit; returns during encountered usually encountered 
  10902. usually ; state )is;: encountered state )is;iosobj  ;itif:valueoperation;
  10903.  
  10904. returns during has the setduring ( set : )is;when ; Otherwise const during 
  10905. error colon int iosobj encountered in extraction ios ; usually a usually a: 
  10906. error ; during ( 
  10907.  
  10908.  error(Otherwise a0);
  10909.  
  10910. error() eofbit iosobj usually set . of ios 0 (state int), an usually 
  10911. encountered operation iosobj colon extraction. of value usually encountered has 
  10912. iosobj , EOF eof when during ( iosobj  during in iosobj . nonzero is, it 
  10913. returns::if.::if.if.::if.::if.if.const operation set been the an iosobj 
  10914. encountered : 
  10915.  
  10916. set.error(returns::if.::if.if.::if.::if.if.constset.());
  10917. . : : colon . colon . eofbit
  10918.  
  10919. ,.an
  10920. , set.an
  10921. ,of nonzero0 :
  10922. ( been)is;:
  10923. ( been)is;.an
  10924. , set: nonzero0 :  ; EOF encountered returns during has the set; set : )is;when ;
  10925.  
  10926. encountered , .Otherwiseeofbit ;returnsduring(encounteredusuallyencounteredusually; state )is;: encountered state  ) is ; ;itif:valueoperation;
  10927.  
  10928. returnsduringhastheset ;set:) is ; when;Otherwiseconstduringerrorcolon iosobjencounteredinextractionios;usuallyausuallya :error;:been.::been.been.an int extraction::been.::been.been.::been.::been.been.eof has is eofbit nonzero during it. ios, if iosobj 0.  EOF eof when during in iosobj . nonzero is, it returns::if :if.if.::if.::if.if.const operation set been the an encountered:
  10929.  
  10930. set.error(returns::if.::if.if.::if.: )
  10931.  
  10932. ,.an
  10933. , set.an
  10934. ,of nonzero0 :
  10935. ( been)is;:
  10936. ( been)is;.an
  10937. , set: nonzero0 :.an
  10938.  
  10939. eof Otherwise; eofbit encountered returns during ; EOF encountered returns 
  10940. during has the set; set : )is;when ; 
  10941.  
  10942. encountered ,. Otherwise eofbit; during encountered usually encountered usually 
  10943. ; state )is;: encountered state )is;; it if : value operation ; 
  10944.  
  10945. returns during has the set ;set:) is ; 
  10946. when;Otherwiseconstduringerrorcolonintiosobjencounteredinextractionios;usuallyausuallya :error;)
  10947.  
  10948. int eof()
  10949.  
  10950. eof() returns a nonzero value if 
  10951. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is set in the error state 
  10952. of iosobj. Otherwise, it returns 0. 
  10953. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is usually set when an 
  10954. EOF has been encountered during an extraction operation. 
  10955.   ) is ; . an 
  10956. ,  set :  nonzero 0  :   . an 
  10957.  
  10958. eof Otherwise; eofbit encountered returns during 
  10959. during(EOFencounteredreturnsduringhastheset ;set:) is ; when ;
  10960.  
  10961. encountered ,. Otherwise eofbit; returns during encountered usually encountered 
  10962. usually ; state )is;: encountered state )is; iosobj ; it if : value operation ; 
  10963.  
  10964. returns during has the setduring ( set : )is;when ; Otherwise const during 
  10965. error colon int iosobj encountered in extraction ios ; usually a . ( usually a: 
  10966. error ; during ( 
  10967.  
  10968.  error(Otherwise a0);
  10969.  
  10970. error() eofbit iosobj usually set . of ios 0 (state int), an usually 
  10971. encountered operation iosobj colon extraction. of value usually encountered has 
  10972. iosobj , EOF eof ) when during ( iosobj  during in iosobj . nonzero is, it 
  10973. returns::if.::if.if.::if.::if.if.const operation set been the an iosobj 
  10974. encountered : 
  10975.  
  10976. set.error(returns::if.::if.if.::if.::if.if.constset.());
  10977.  . : : colon . colon . eofbit is usually set when an  iosobj ) EOF has been 
  10978. encountered during an extraction operation. .  been .  : : been . : : been . 
  10979. been . eofhasiseofbitnonzeroduringit .ios ,ifiosobj0 
  10980. .int iosobjencountered ios  .(usuallyausually: error   0 
  10981.  
  10982. ,.an
  10983. , set.an
  10984. ,of nonzero0 :
  10985. ( been)is;:
  10986. ( been)is;.an
  10987. , set: nonzero0 :  ; EOF encountered returns during has the set; set : )is;when ;
  10988.  
  10989. encountered , .Otherwiseeofbit ;returnsduring(encounteredusuallyencounteredusually; state )is;: encountered state  ) is ; ;itif:valueoperation;
  10990.  
  10991. returnsduringhastheset ;set:) is ; when;Otherwiseconstduringerrorcolon iosobjencounteredinextractionios;usuallyausuallya :error;:been.::been.been.an int extraction::been.::been.been.::been.::been.been.eof has is eofbit nonzero during it. ios, if iosobj 0.  EOF eof when during in iosobj . nonzero is, it returns::if :if.if.::if.::if.if.const operation set been the an encountered:
  10992.  
  10993. set.error(returns::if.::if.if.::if.: )
  10994.  
  10995. ,.an
  10996. , set.an
  10997. ,of nonzero0 :
  10998. ( been)is;:
  10999. ( been)is;.an
  11000. , set: nonzero0 :.an
  11001.  
  11002. eof Otherwise; eofbit encountered returns during ; EOF encountered returns 
  11003. during has the set; set : )is;when ; 
  11004.  
  11005. encountered ,. Otherwise eofbit; during encountered usually encountered usually 
  11006. ; state )is;: encountered state )is;; it if : value operation ; 
  11007.  
  11008. returns during has the set ;set:) is ; 
  11009. when;Otherwiseconstduringerrorcolonintiosobjencounteredinextractionios;usuallyausuallya :error;)
  11010.  
  11011. int eof()
  11012.  
  11013. eof() returns a nonzero value if 
  11014. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is set in the error state 
  11015. of iosobj. Otherwise, it returns 0. 
  11016. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is usually set when an 
  11017. EOF has been encountered during an extraction operation. 
  11018.   ) is ; . an 
  11019. ,  set :  nonzero 0  :   . an 
  11020.  
  11021. eof Otherwise; eofbit encountered returns during 
  11022. during(EOFencounteredreturnsduringhastheset ;set:) is ; when
  11023.  
  11024. ifstream();
  11025. ifstream(int d);
  11026. ifstream(const char* fname,
  11027.          int mode=ios&c2.in,
  11028.          int prot=filebuf&c2.openprot);
  11029. ifstream(int d, char* p, int len);
  11030.  
  11031. There are four versions of the ifstream constructor. The first version takes no 
  11032. arguments and constructs an unopened ifstream object. The second version takes 
  11033. one argument and constructs an ifstream object that is attached to the file 
  11034. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  11035. ifs. 
  11036.  
  11037. The third and fourth versions of the ifstream() constructor take three 
  11038. arguments. The third version constructs an ifstream object and opens the file 
  11039. fname with open mode equal to mode and protection mode equal to prot. The 
  11040. default value for mode is ios&c2.in, and the default value for prot is 
  11041. filebuf&c2.openprot. If the file cannot be opened, the error state of the 
  11042. constructed ifstream object is set. 
  11043.  
  11044. The fourth version constructs an ifstream object that is attached to the file 
  11045. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  11046. ifs. This constructor also sets up an associated filebuf object with a stream 
  11047. buffer that has length len bytes and begins at the position pointed to by p. If 
  11048. p is equal to 0 or len is equal to 0, the associated filebuf object is 
  11049. unbuffered. 
  11050.  
  11051. int fail() const;
  11052.  
  11053. fail() returns a nonzero value if either 
  11054. ios::colon.::colon.colon.::colon.::colon.colon.badbit or 
  11055. ios::colon.::colon.colon.::colon.::colon.colon.failbit is set in the error 
  11056. state. Otherwise, it returns 0. returns fail  Otherwise   . ( a 
  11057. :int  0 ,returns)0 badbit;colon; it  0 in a error  :badbit
  11058.  
  11059. ,.badbit
  11060. , .badbit
  11061. ,value the0 :
  11062. ( colon)set;:
  11063. ( colon)set;.badbit
  11064. , : the0 :   .badbit
  11065.  
  11066. failbit ; in fail error  ;iffailerroris;:) set ; ;
  11067.  
  11068. fail ,. in; error ( fail fail  ;) set ; :fail) set ; ;stateit:;
  11069.  
  11070. error is ; : )set; ; either error int returns fail nonzero ios Otherwise ; a a: 
  11071. int ; : colon . colon  : colon . : : colon . colon . badbitorios : : colon . : 
  11072. : colon . colon . : : colon . : : colon . colon . failbitissetintheerrorstate 
  11073. .Otherwise ,itreturns0 . iffailbiterrornonzeroreturns.theset ,state: : : it . 
  11074. it . : : it . : : it . it . eithercolonbadbit fail:
  11075.  
  11076. .int(::it.::it.it.::it.: )
  11077.  
  11078. ,.badbit
  11079. , .badbit
  11080. ,value the0 : colon)set;:
  11081. ( colon)set;.badbit
  11082. , : the0 :  .badbit
  11083.  
  11084. failbit ; in fail error ; if fail is ; : )set;; 
  11085.  
  11086. fail ,. in;  error fail fail ; )set;: fail )set;; state it : ; 
  11087.  
  11088. error a a: int ; ) 
  11089.  
  11090. or failbit() either
  11091.  
  11092. failbit() a the it Otherwise::const.::const.const.::const.::const.const.in set 
  11093. nonzero int value returns. 0. 
  11094. Otherwise::const.::const.const.::const.::const.const.in set badbit if is colon 
  11095. fail error badbit ios . 
  11096.    ) set ; . badbit 
  11097. ,  :  the 0  :    . badbit 
  11098.  
  11099. failbit ; in fail error error(iffailerroris;:) set ;  )
  11100.  
  11101. ,.badbit
  11102. ,
  11103.  
  11104.  
  11105. ΓòÉΓòÉΓòÉ <hidden> n.colon.::colon.::colon.colon.failbit and ios::colon.::co ΓòÉΓòÉΓòÉ
  11106.  
  11107. . ( . badbit 
  11108. , value  the 0  : 
  11109. (  colon ) set ; : 
  11110. (  colon ) set ; . badbit 
  11111. ,  :  the 0  :   . badbit 
  11112.  
  11113. failbit ; in fail error ; if fail error is ; : )set;; 
  11114.  
  11115. fail ,. in; error fail fail ; )set;: fail )set;; it : ; 
  11116.  
  11117. error is ; : )set;; either error int const or nonzero ios Otherwise ; a a: int 
  11118. ; : 
  11119.  
  11120. int fail() const;
  11121.  
  11122. fail() returns a nonzero value if either ios::colon.::colon.colon.::colon.::. 
  11123. badbitorios : : colon . : : colon . colon . : : colon . : : colon . colon . 
  11124. failbitissetintheerrorstate .Otherwise ,itreturns0 .or returnsfail Otherwise  .(a
  11125.  
  11126. ,.badbit
  11127. , .badbit
  11128. ,value the0 :
  11129. ( colon)set;:
  11130. ( colon)set;.badbit
  11131. , : the0 :   .badbit
  11132.  
  11133. failbit ; in fail error  ;iffailerroris;:) set ; ;
  11134.  
  11135. fail ,. in; error ( fail fail  ;) set ; :fail) set ; ;stateit:;
  11136.  
  11137. error is ; : )set; ; either error int returns fail nonzero ios Otherwise ; a a: 
  11138. int ; : colon . colon  : colon . : : colon . colon . badbitorios : : colon . : 
  11139. : colon . colon . : : colon . : : colon . colon . failbitissetintheerrorstate 
  11140. .Otherwise ,itreturns0 . iffailbiterrornonzeroreturns.theset ,state: : : it . 
  11141. it . : : it . : : it . it . eithercolonbadbit fail:
  11142.  
  11143. .int(::it.::it.it.::it.: )
  11144.  
  11145. ,.badbit
  11146. , .badbit
  11147. ,value the0 : colon)set;:
  11148. ( colon)set;.badbit
  11149. , : the0 :  .badbit
  11150.  
  11151. failbit ; in fail error ; if fail is ; : )set;; 
  11152.  
  11153. fail ,. in;  error fail fail ; )set;: fail )set;; state it : ; 
  11154.  
  11155. error a a: int ; ) 
  11156.  
  11157. or failbit() either
  11158.  
  11159. failbit() a the it Otherwise::const.::const.const.::const.::const.const.in set 
  11160. nonzero int value returns. 0. 
  11161. Otherwise::const.::const.const.::const.::const.const.in set badbit if is colon 
  11162. fail error badbit ios . 
  11163.    ) set ; . badbit 
  11164. ,  :  the 0  :    . badbit 
  11165.  
  11166. failbit ; in fail error error(iffailerroris;:) set ;  )
  11167.  
  11168. ,.badbit
  11169. ,.(.badbit
  11170. ,value the0 :
  11171. ( colon)set;:
  11172. ( colon)set;.badbit
  11173. , : the0 :  .badbit
  11174.  
  11175. failbit ; in fail error ; if fail error is ; : )set;; 
  11176.  
  11177. fail ,. in; error fail fail ; )set;: fail )set;; it : ; 
  11178.  
  11179. error is ; : )set;; either error int const or nonzero ios Otherwise ; a a: int 
  11180. ; : 
  11181.  
  11182. int fail() const;
  11183.  
  11184. fail() returns a nonzero value if either ios::colon.::colon.colon.::colon.::. 
  11185. badbitorios : : colon . : : colon . colon . : : colon . : : colon . colon . 
  11186. failbitissetintheerrorstate .Otherwise ,itreturns0 .or returnsfail Otherwise  .(a
  11187.  
  11188. ,.badbit
  11189. , .badbit
  11190. ,value the0 :
  11191. ( colon)set;:
  11192. ( colon)set;.badbit
  11193. , : the0 :   .badbit
  11194.  
  11195. failbit ; in fail error  ;iffailerroris;:) set ; ;
  11196.  
  11197. fail ,. in; error ( fail fail  ;) set ; :fail) set ; ;stateit:;
  11198.  
  11199. error is ; : )set; ; either error int returns fail nonzero ios Otherwise ; a a: 
  11200. int ; 
  11201.  
  11202. ifstream();
  11203. ifstream(int d);
  11204. ifstream(const char* fname,
  11205.          int mode=ios&c2.in,
  11206.          int prot=filebuf&c2.openprot);
  11207. ifstream(int d, char* p, int len);
  11208.  
  11209. There are four versions of the ifstream constructor. The first version takes no 
  11210. arguments and constructs an unopened ifstream object. The second version takes 
  11211. one argument and constructs an ifstream object that is attached to the file 
  11212. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  11213. ifs. 
  11214.  
  11215. The third and fourth versions of the ifstream() constructor take three 
  11216. arguments. The third version constructs an ifstream object and opens the file 
  11217. fname with open mode equal to mode and protection mode equal to prot. The 
  11218. default value for mode is ios&c2.in, and the default value for prot is 
  11219. filebuf&c2.openprot. If the file cannot be opened, the error state of the 
  11220. constructed ifstream object is set. 
  11221.  
  11222. The fourth version constructs an ifstream object that is attached to the file 
  11223. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  11224. ifs. This constructor also sets up an associated filebuf object with a stream 
  11225. buffer that has length len bytes and begins at the position pointed to by p. If 
  11226. p is equal to 0 or len is equal to 0, the associated filebuf object is 
  11227. unbuffered. 
  11228.  
  11229. void clear(int state=0);
  11230.  
  11231. clear() changes the error state of iosobj to state. If state equals 0 (its 
  11232. default), all of the bits in the error state are cleared. If you want to set 
  11233. one of the bits without clearing the other bits in the error state, you can 
  11234. bitwise OR the bit you want to set with the current error state. For example, 
  11235. the following statement sets 
  11236. ios::colon.::colon.colon.::colon.::colon.colon.badbit in iosobj and leaves all 
  11237. the other error state bits unchanged: 
  11238.  
  11239. iosobj.clear(ios::colon.::colon.colon.::colon.::colon.colon.badbit|iosobj.rdstate());
  11240. clear its If error. int ios 0. equals::are.::are.are.::are.::are.are.changes 
  11241. example of iosobj OR all can clearing and bits bit all cleared in. 
  11242.    ) example ; . all 
  11243. with , you  iosobj :  For 0  :  you    . ( iosobj  . all 
  11244. with , If  For 0  sets : 
  11245. ( you  and | ) example ; without : 
  11246. ( you  and rdstate ) example ; . all 
  11247. with , you  iosobj :  For 0  :  you  . all 
  11248.  
  11249. bitwise the  with int; set changes bits ios bit with ; can bits ios bit with 
  11250. clearing other leaves iosobj; void iosobj : |)example;OR without statement 
  11251. want; 
  11252.  
  11253. bits to with,.  changes; ios bit with bits other sets of , . ( bits of ; its 
  11254. state |)example;without: bits its state rdstate)example;; void  colon : one in 
  11255. with ; 
  11256.  
  11257. to ios bit with clearing other leaves iosobj; void iosobj : |)example;OR 
  11258. without statement want; int badbit bit clear rdstate are default unchanged 
  11259. current cleared equals ; void of = of =: clear rdstate 
  11260.  
  11261. with,.all
  11262. with,you iosobj.all
  11263. with,If For0 sets:
  11264. (you and|)example;without:
  11265. (you andrdstate)example;.all
  11266. with,you iosobj: For0 : you  with , .intchanges ;iosbitsothersetsofbitsof ; its state |)example;without: bits its state  ) example ; ;voidotherfollowingcolon:oneinwith;
  11267.  
  11268. toiosbitwithclearingotherleavesiosobj ;voidiosobj:| ) example ; ORwithout want ;intbadbitbitclearrdstateare unchangederrorbitscurrentclearedequals;voidof=of= :clearrdstate; andrdstate)example;.all
  11269. with,you iosobj: For0 : you .all
  11270.  
  11271. bitwise the with int; set changes bits ios bit with ; can bits ios bit with 
  11272. clearing other leaves iosobj; void iosobj :| ) example ; ORwithoutstatementwant ;
  11273.  
  11274. bits to with,. int changes; ios bit with bits other sets of bits of ; its state 
  11275. |)example;without: bits its state rdstate)example;; void other following colon 
  11276. : one in with ; 
  11277.  
  11278. to ios bit with clearing other leaves iosobj; void iosobj : |)example;OR 
  11279. without statement , . 
  11280. ;intbadbitbitclearrdstatearedefaultunchangederrorbitscurrentclearedequals;voidof=of= :clearrdstate;,bit(
  11281.  
  11282. void clear(int state=0);
  11283.  
  11284. clear() changes the error state of iosobj to state. If state equals 0 (its 
  11285. default), all of the bits in the error state are cleared. If you want to set 
  11286. one of the bits without clearing the other bits in the error state, you can 
  11287. bitwise OR the bit you want to set with the current error state. For example, 
  11288. the following statement sets ios::colon.::colon.colon.:. : : colon . colon . 
  11289. badbitiniosobjandleavesalltheothererrorstatebitsunchanged :
  11290.  
  11291. iosobj.clear(ios::colon.::colon.colon.::colon.::colon.colon.badbit|iosobj.rdstate());
  11292. bit ( clear its If error. int ios 0. 
  11293. equals::are.::are.are.::are.::are.are.changes example of iosobj OR all can 
  11294. clearing and bits bit all cleared in. 
  11295.    ) example ; . all 
  11296. with , you  iosobj :  For 0  :  you  can bits ios bit with clearing other 
  11297. leaves iosobj; void iosobj : |)example;OR  without statement without ) 
  11298.  
  11299. with,.all
  11300. with,you  .(iosobjsets:
  11301. (you and|)example;without:
  11302. (you andrdstate)example;.all
  11303. with,you iosobj: For0 : you .all
  11304.  
  11305. bitwise the  with int; set changes bits ios bit with ; can bits ios bit with 
  11306. clearing other leaves iosobj; void iosobj : |)example;OR without statement 
  11307. want; 
  11308.  
  11309. bits to with,.  changes; ios bit with bits other sets of bit ( , . ( bits of ; 
  11310. its state |)example;without: bits its state rdstate)example;; void  colon : one 
  11311. in with ; 
  11312.  
  11313. to ios bit with clearing other leaves iosobj; void iosobj : |)example;OR 
  11314. without statement ( want; int badbit bit clear rdstate are default unchanged 
  11315. current cleared equals ; void of = of =: clear rdstate  ;:
  11316.  
  11317. clear bits() are;
  11318.  
  11319. bits() error = current If can badbit cleared::and.::and.and.::and.::and .all 
  11320. default cleared::and.::and.and.::and.::and.and.bitwise clearing example changes 
  11321. For bit following. equals, colon error 0. default  error bits  equals   . ( of 
  11322.  
  11323. ifstream();
  11324. ifstream(int d);
  11325. ifstream(const char* fname,
  11326.          int mode=ios&c2.in,
  11327.          int prot=filebuf&c2.openprot);
  11328. ifstream(int d, char* p, int len);
  11329.  
  11330. There are four versions of the ifstream constructor. The first version takes no 
  11331. arguments and constructs an unopened ifstream object. The second version takes 
  11332. one argument and constructs an ifstream object that is attached to the file 
  11333. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  11334. ifs. 
  11335.  
  11336. The third and fourth versions of the ifstream() constructor take three 
  11337. arguments. The third version constructs an ifstream object and opens the file 
  11338. fname with open mode equal to mode and protection mode equal to prot. The 
  11339. default value for mode is ios&c2.in, and the default value for prot is 
  11340. filebuf&c2.openprot. If the file cannot be opened, the error state of the 
  11341. constructed ifstream object is set. 
  11342.  
  11343. The fourth version constructs an ifstream object that is attached to the file 
  11344. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  11345. ifs. This constructor also sets up an associated filebuf object with a stream 
  11346. buffer that has length len bytes and begins at the position pointed to by p. If 
  11347. p is equal to 0 or len is equal to 0, the associated filebuf object is 
  11348. unbuffered. 
  11349.  
  11350. int eof() const;
  11351.  
  11352. eof() returns a nonzero value if 
  11353. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is set in the error state 
  11354. of iosobj. Otherwise, it returns 0. 
  11355. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is usually set when an 
  11356. EOF has been encountered during an extraction operation. .  :   . an 
  11357.  
  11358. eof Otherwise; eofbit encountered returns during ; EOF encountered returns 
  11359. during has the set; set during ( :) is ; when;
  11360.  
  11361. encountered ,. Otherwise 
  11362. ;returnsduringencounteredusuallyencounteredusually;state) is ; 
  11363. :encounteredstate) is ; ;itif:valueoperation;
  11364.  
  11365. returns during has the ( set; set : )is;when during(,. ; Otherwise const during 
  11366. error colon int iosobj encountered in extraction ios ; usually a usually a: 
  11367. error ; , during ( 
  11368.  
  11369. (Otherwise a0);
  11370.  
  11371. error() eofbit iosobj usually set . of ios 0 (state int), an usually 
  11372. encountered operation iosobj colon extraction. of value usually encountered has 
  11373. encountered operation iosobj , EOF eof when during in iosobj . nonzero is, it ) 
  11374. returns::if.::if.if.:during(.::if.if.const operation set been the an iosobj 
  11375. encountered : 
  11376.  
  11377. set.error(returns::if.::if.if.::if.::if.if.constset.());
  11378. during ( error state of iosobj. Otherwise returns 0. ios::colon.::colon.colon.. 
  11379. : : colon . colon . 
  11380. eofbitisusuallysetwhenanEOFhasbeenencounteredduringanextractionoperation .
  11381.    ) is ; . an 
  11382. ,  set :  nonzero 0  :   set; set : )is;when  ) 
  11383.  
  11384. ,.an
  11385. ,  .(set:
  11386. ( been)is;:
  11387. ( been)is;.an
  11388. , set: nonzero,.(:  .an
  11389.  
  11390. eof  Otherwise; eofbit encountered returns during ; EOF encountered returns 
  11391. during has the set; set : )is;when ; 
  11392.  
  11393. encountered ,.  eofbit; returns during encountered usually during ( , . ( 
  11394. encountered usually ; state )is;: encountered state )is;;  if : value operation 
  11395.  
  11396. returns during the set; set : )is;when const during error colon int  in 
  11397. extraction ios ; usually a usually a: error  ;
  11398.  
  11399. error encountered() colon;
  11400.  
  11401. encountered() iosobj a in of EOF const 
  11402. extraction::been.::been.been.::been.::been .an int 
  11403. extraction::been.::been.been.::been.::been.been.eof has is eofbit nonzero 
  11404. during it. ios, if iosobj 0. int  iosobj encountered  ios 
  11405.  
  11406. ,.an
  11407. , set.an
  11408. ,of nonzero0 :
  11409. ( been)is;:
  11410. ( been)is;.an
  11411. , set: nonzero0 :  .an
  11412.  
  11413. eof Otherwise; eofbit encountered returns during 
  11414. ;EOFencounteredreturnsduringhastheset ;set:) is ; when;
  11415.  
  11416. encountered ,. Otherwise eofbit; returns during encountered usually encountered 
  11417. usually ;state) is ; :encounteredstate) is ; ;itif:valueoperation;
  11418.  
  11419. returns during has the set; set : )is;when ; Otherwise const during error colon 
  11420. int iosobj encountered in extraction ios ; usually a usually a: error ; colon . 
  11421. : : colon . colon . eofbitissetintheerrorstateofiosobj .Otherwise ,itreturns0 
  11422. .ios : : colon . : : colon . colon . : : colon . : : colon . colon . 
  11423. eofbitisusuallysetwhenanEOFhasbeenencounteredduringanextractionoperation . . :  .an
  11424.  
  11425. eof Otherwise; eofbit encountered returns during ; EOF encountered returns 
  11426. during has the set; set during ( :) is ; when;
  11427.  
  11428. encountered ,. Otherwise  ;returnsduringencounteredusuallyencounteredusually; 
  11429. state )is;: encountered state )is;; it if : value operation ; 
  11430.  
  11431. returns during has the during ( , . 
  11432. ;Otherwiseconstduringerrorcolonintiosobjencounteredinextractionios;usuallyausuallya :error;,during(
  11433.  
  11434.  (Otherwise a0);
  11435.  
  11436. error() eofbit iosobj usually set ( . of ios 0 (state int), an usually 
  11437. encountered operation iosobj colon extraction. of value usually encountered has 
  11438. encountered operation iosobj , EOF eof when during in iosobj . nonzero is, it ) 
  11439. colon set . error ( returns : : if . : : if . if . : : if . : : if . if . const 
  11440. set . ( ) ) ; 
  11441. during ( error state of iosobj. Otherwise returns 0. 
  11442. ios::colon.::colon.colon.: .::colon.colon.eofbit is usually set when an EOF has 
  11443. been encountered during an extraction operation. 
  11444.   ) is ; . an 
  11445. ,  set :  nonzero 0  : 
  11446.  
  11447. ,.an
  11448. ,  .(set:
  11449. ( been)is;:
  11450. ( been)is;.an
  11451. , set: nonzero0 ,.(:  .an
  11452.  
  11453. eof  Otherwise; eofbit encountered returns during 
  11454. ;EOFencounteredreturnsduringhastheset ;set:) is ; when;
  11455.  
  11456. encountered ,. ;state) is ; :encounteredstate) is ; ; if:valueoperation;
  11457.  
  11458. returns during  the set; set : )is;when const during error colon int  in 
  11459. extraction ios ; usually a usually a: error  ;:
  11460.  
  11461. error encountered() colon;
  11462.  
  11463. encountered() iosobj a in of EOF const extraction::been.::been.: been . : : 
  11464. been  . anintextraction : : been . : : been . been . : : been . : : been . been 
  11465. . eofhasiseofbitnonzeroduringit .ios ,ifiosobj0 
  11466. .int iosobjencountered ios  .(usuallyausually: error   0 
  11467.  
  11468. ,.an
  11469. , set.an
  11470. ,of nonzero0 :
  11471. ( been)is;:
  11472. ( been)is;.an
  11473. , set: nonzero0 :  .an
  11474.  
  11475. eof Otherwise; eofbit encountered returns during 
  11476. ;EOFencounteredreturnsduringhastheset ;set:) is ; when;
  11477.  
  11478. encountered ,. Otherwise eofbit; returns during encountered usually encountered 
  11479. usually ;state) is ; :encounteredstate) is ; ;itif:valueoperation;
  11480.  
  11481. returns during has the set; set : )is;when ; Otherwise const during error colon 
  11482. int iosobj encountered in extraction ios ; usually a usually a: error ; colon . 
  11483. : : colon . colon . eofbitissetintheerrorstateofiosobj .Otherwise ,itreturns0 
  11484. .ios : : colon . : : colon . colon . : : colon . : : colon . colon . 
  11485. eofbitisusuallysetwhenanEOFhasbeenencounteredduringanextractionoperation . . :  .an
  11486.  
  11487. eof Otherwise; eofbit encountered returns during ; EOF encountered returns 
  11488. during has the set; set during ( :) is ; when;
  11489.  
  11490. encountered ,. Otherwise  ;returnsduringencounteredusuallyencounteredusually
  11491.  
  11492. ifstream();
  11493. ifstream(int d);
  11494. ifstream(const char* fname,
  11495.          int mode=ios&c2.in,
  11496.          int prot=filebuf&c2.openprot);
  11497. ifstream(int d, char* p, int len);
  11498.  
  11499. There are four versions of the ifstream constructor. The first version takes no 
  11500. arguments and constructs an unopened ifstream object. The second version takes 
  11501. one argument and constructs an ifstream object that is attached to the file 
  11502. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  11503. ifs. 
  11504.  
  11505. The third and fourth versions of the ifstream() constructor take three 
  11506. arguments. The third version constructs an ifstream object and opens the file 
  11507. fname with open mode equal to mode and protection mode equal to prot. The 
  11508. default value for mode is ios&c2.in, and the default value for prot is 
  11509. filebuf&c2.openprot. If the file cannot be opened, the error state of the 
  11510. constructed ifstream object is set. 
  11511.  
  11512. The fourth version constructs an ifstream object that is attached to the file 
  11513. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  11514. ifs. This constructor also sets up an associated filebuf object with a stream 
  11515. buffer that has length len bytes and begins at the position pointed to by p. If 
  11516. p is equal to 0 or len is equal to 0, the associated filebuf object is 
  11517. unbuffered. 
  11518.  
  11519. int fail() const;
  11520.  
  11521. fail() returns a nonzero value if either 
  11522. ios::colon.::colon.colon.::colon.::colon.colon.badbit or 
  11523. ios::colon.::colon.colon.::colon.::colon.colon.failbit is set in the error 
  11524. state. Otherwise, it returns 0. in fail error error(iffailerroris;:) set ; 
  11525.  
  11526. ,.badbit
  11527. ,  .(. :
  11528. ( colon)set;:
  11529. ( colon)set;.badbit
  11530. , : the0 ,.(:  .badbit
  11531.  
  11532. failbit  ; in fail error  ;if fail error is ; : )set;; 
  11533.  
  11534. fail ,. .  error ( , . ( fail  ;) set ; :fail) set ; ; it:;
  11535.  
  11536.  ; : )set; either error int const or  nonzero ios Otherwise ; a a: int  ;:
  11537.  
  11538. int fail() const;
  11539.  
  11540. fail() returns a nonzero value if either 
  11541. ios::colon.::colon.colon :colon.::colon .badbit or ios::colon.::colon: : colon 
  11542. . : : colon . colon . failbitissetintheerrorstate .Otherwise ,itreturns0 
  11543. .or returnsfail Otherwise  .(a: int   0 
  11544.  
  11545. ,.badbit
  11546. , .badbit
  11547. ,value the0 :
  11548. ( colon)set;:
  11549. ( colon)set;.badbit
  11550. , : the0 :   .badbit
  11551.  
  11552. failbit ; in fail error  ;iffailerroris;:) set ; ;
  11553.  
  11554. fail ,. in; error fail fail  ;) set ; :fail) set ; ;stateit:;
  11555.  
  11556. error is ; : )set; ; either error int returns fail nonzero ios Otherwise ; a a: 
  11557. int ; const . const .  const . : : const . const . insetnonzerointvaluereturns 
  11558. .,state0 .Otherwise : : const . : : const . const . : : const . : : const . 
  11559. const . insetbadbitifiscolonfailerrorbadbitios. . :   . badbit 
  11560.  
  11561. failbit ; in fail error ;  if fail error is ; error ( :) set ; ;
  11562.  
  11563. fail ,.  ;errorfailfail) 
  11564.  
  11565. ,.badbit
  11566. , .badbit
  11567. ,value the0 :
  11568. (
  11569.  
  11570.  
  11571. ΓòÉΓòÉΓòÉ <hidden> n.colon.::colon.::colon.colon.failbit and ios::colon.::co ΓòÉΓòÉΓòÉ
  11572.  
  11573. .  colon ) set ; : 
  11574. (  colon ) set ; . badbit 
  11575. ,  :  the 0  :   . badbit 
  11576.  
  11577. failbit ; in fail error ; if fail error is ; : )set;; 
  11578.  
  11579. fail ,. in; error fail .  fail ; )set;: fail )set;; state it : ; 
  11580.  
  11581. error is ;:) set ; ;eithererrorintconstorreturnsfailnonzeroiosOtherwise;aa: int 
  11582. ; : 
  11583.  
  11584. int fail() const;
  11585.  
  11586. fail() returns a nonzero value if either 
  11587. ios::colon.::colon.colon.::colon.::colon.colon.badbit or 
  11588. ios::colon.::colon.colon.::colon.::colon.colon.returns  is set in the error 
  11589. state. Otherwise, it returns 0.  in fail error error(iffailerroris;:) set ; 
  11590.  
  11591. ,.badbit
  11592. ,.( . :
  11593. ( colon)set;:
  11594. ( colon)set;.badbit
  11595. , : the0 ,.(:  .badbit
  11596.  
  11597. failbit ; in fail error  ; iffailerroris;:) set ; ;
  11598.  
  11599. fail ,. in; error fail  .  error ( , . ( fail  ;) set ; :fail) set ; ;it : ; 
  11600.  
  11601.   ; : )set; either error int const or nonzero ios Otherwise ; a a: int  ;:
  11602.  
  11603. int fail() const;
  11604.  
  11605. fail() returns a nonzero value if either ios::colon.::colon.colon :colon.::. 
  11606. badbitorios : : colon . : : colon .  : : colon . : : colon . colon . 
  11607. failbitissetintheerrorstate .Otherwise ,itreturns0 .or returnsfail Otherwise  .(a
  11608.  
  11609. ,.badbit
  11610. , .badbit
  11611. ,value the0 :
  11612. ( colon)set;:
  11613. ( colon)set;.badbit
  11614. , : the0 :   .badbit
  11615.  
  11616. failbit ; in fail error  ;iffailerroris;:) set ; ;
  11617.  
  11618. fail ,. in; error fail fail  ;) set ; :fail) set ; ;stateit:;
  11619.  
  11620. error is ; : )set; ; either error int returns fail nonzero ios Otherwise ; a a: 
  11621. int ; const . const .  const . : : const . const . insetnonzerointvaluereturns 
  11622. .,state0 .Otherwise : : const . : : const . const . : : const . : : const . 
  11623. const . insetbadbitifiscolonfailerrorbadbitios. . :   . badbit 
  11624.  
  11625. failbit ; in fail error ;  if fail error is ; error ( :) set ; ;
  11626.  
  11627. fail ,.  ;errorfailfail) 
  11628.  
  11629. ,.badbit
  11630. , .badbit
  11631. ,value the0 :
  11632. ( . colon)set;:
  11633. ( colon)set;.badbit
  11634. , : the0 :  .badbit
  11635.  
  11636. failbit ; in fail error ; if fail error is ; : )set;; 
  11637.  
  11638. fail ,. in; error fail .  fail ; )set;: fail )set;; state it : ; 
  11639.  
  11640. error is ;:) set ; ;eithererrorintconstorreturnsfailnonzeroiosOtherwise;aa: int 
  11641. ; : 
  11642.  
  11643. int fail() const;
  11644.  
  11645. fail() returns a nonzero value if either 
  11646. ios::colon.::colon.colon.::colon.::colon.colon.badbit or 
  11647. ios::colon.::colon.colon.::colon.::colon.colon.returns  is set in the error 
  11648. state. Otherwise, it returns 0.  in fail error error(iffailerroris;:) set ; 
  11649.  
  11650. ,.badbit
  11651. ,.( . :
  11652. ( colon)set;:
  11653. ( colon)set;.badbit
  11654. , : the0 ,.(:  .badbit
  11655.  
  11656. failbit ; in fail error  ; iffailerroris;:) set ; ;
  11657.  
  11658. fail ,. in; error fail  .  error ( , . ( fail  ;) set ; :fail) set ; ;it : ; 
  11659.  
  11660.   ; : )set; either error int const or nonzero ios Otherwise ; a a: int  ;:
  11661.  
  11662. int fail() const;
  11663.  
  11664. fail() returns a nonzero value if either ios::colon.::colon.colon :colon.::
  11665.  
  11666. ifstream();
  11667. ifstream(int d);
  11668. ifstream(const char* fname,
  11669.          int mode=ios&c2.in,
  11670.          int prot=filebuf&c2.openprot);
  11671. ifstream(int d, char* p, int len);
  11672.  
  11673. There are four versions of the ifstream constructor. The first version takes no 
  11674. arguments and constructs an unopened ifstream object. The second version takes 
  11675. one argument and constructs an ifstream object that is attached to the file 
  11676. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  11677. ifs. 
  11678.  
  11679. The third and fourth versions of the ifstream() constructor take three 
  11680. arguments. The third version constructs an ifstream object and opens the file 
  11681. fname with open mode equal to mode and protection mode equal to prot. The 
  11682. default value for mode is ios&c2.in, and the default value for prot is 
  11683. filebuf&c2.openprot. If the file cannot be opened, the error state of the 
  11684. constructed ifstream object is set. 
  11685.  
  11686. The fourth version constructs an ifstream object that is attached to the file 
  11687. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  11688. ifs. This constructor also sets up an associated filebuf object with a stream 
  11689. buffer that has length len bytes and begins at the position pointed to by p. If 
  11690. p is equal to 0 or len is equal to 0, the associated filebuf object is 
  11691. unbuffered. 
  11692.  
  11693. void clear(int state=0);
  11694.  
  11695. clear() changes the error state of iosobj to state. If state equals 0 (its 
  11696. default), all of the bits in the error state are cleared. If you want to set 
  11697. one of the bits without clearing the other bits in the error state, you can 
  11698. bitwise OR the bit you want to set with the current error state. For example, 
  11699. the following statement sets 
  11700. ios::colon.::colon.colon.::colon.::colon.colon.badbit in iosobj and leaves all 
  11701. the other error state bits unchanged: 
  11702.  
  11703. iosobj.clear(ios::colon.::colon.colon.::colon.::colon.colon.badbit|iosobj.rdstate());
  11704. want; 
  11705.  
  11706. bits to  with,. int  ;iosbitwithbitsothersetsofbitsof) 
  11707.  
  11708. with,.all
  11709. with,you iosobj.all
  11710. with,If For0 sets:
  11711. (you  . and|)example;without:
  11712. (you andrdstate)example;.all
  11713. with,you iosobj: For0 : you .all
  11714.  
  11715. bitwise the with int; set changes bits ios bit with ; can bits ios bit with 
  11716. clearing  ;voidiosobj:| ) example ; ORwithoutstatementwant ;
  11717.  
  11718. bits to with,. int changes; ios bit with bits other sets of  .  bits of ; its 
  11719. state |)example;without: bits its state rdstate)example;; void other following 
  11720. colon : one in with ; 
  11721.  
  11722. to ios bit with clearing other leaves  iosobj ;voidiosobj:| ) 
  11723. ORwithoutstatementwant 
  11724. ;intbadbitbitclearrdstatearedefaultunchangederrorbitscurrentclearedequals;voidof=of= :clearrdstate;:
  11725.  
  11726. clear bits() are;
  11727.  
  11728. bits() error = current If can badbit cleared::and.::and.and.::and.::and.and.all 
  11729. default cleared::and.::and.and.::and.::and.and.bitwise  error  clearing example 
  11730. changes For bit following. equals, colon error 0.  changes bits ios bit with 
  11731. bit(canbitsiosbitwithclearingotherleaves;voidiosobj:| ) example ; OR withoutstatement
  11732.  
  11733. with,.all
  11734. with,you  .(iosobjsets . :
  11735. (you and|)example;without:
  11736. (you andrdstate)example;.all
  11737. with,you iosobj: For0 ,.(: you .all
  11738.  
  11739. bitwise the  with int; set changes bits ios bit with 
  11740. ; canbitsiosbitwithclearingotherleavesiosobj ;voidiosobj:| ) example ; 
  11741. ORstatement want; 
  11742.  
  11743. bits to with,.  other leaves iosobj; void iosobj : |)example;OR without  badbit 
  11744. bit clear rdstate are default  current cleared equals ; void of = of =: clear 
  11745. rdstate  ;:
  11746.  
  11747. clear bits() are;
  11748.  
  11749. bits() error = current If can badbit cleared::and.::and.and :and.::and .all 
  11750. default cleared::and.::and. ::and.::and.and.bitwise clearing example changes 
  11751. For bit following. equals, colon error 0. default  error bits  equals   . ( of 
  11752. = of  :clearrdstate|
  11753.  
  11754. with,.all
  11755. with,you iosobj.all
  11756. with,If For0 sets:
  11757. (you and|)example;without:
  11758. (you andrdstate)example;.all
  11759. with,you iosobj: For0 : you .all
  11760.  
  11761. bitwise the with int; set changes bits ios bit with ; can bits ios bit with 
  11762. clearing other leaves iosobj; void iosobj : |)example;OR without statement 
  11763. want; 
  11764.  
  11765. bits to with,. int changes; ios bits other sets of bits of ; its state 
  11766. |)example;without: bits its state rdstate)example;; void other following colon 
  11767. : one in with ; 
  11768.  
  11769. to ios bit with clearing other leaves iosobj; void iosobj : |)example;OR 
  11770. without statement want; int badbit bit clear rdstate are default unchanged 
  11771. error bits current cleared equals ; void of = of =: clear rdstate ; . ( state = 
  11772. 0 ) ; 
  11773.  
  11774. clear() changes the error state of iosobj to state. If state equals 0 (its 
  11775. default), all of the bits in the error state are cleared. If you want to set 
  11776. one of the bits without clearing the other bits in the error state, you can 
  11777. bitwise OR the bit you want to set with the current error state. For example, 
  11778. the following statement sets 
  11779. ios::colon.::colon.colon.::colon.::colon.colon.badbit in iosobj and leaves all 
  11780. the other error state bits unchanged: 
  11781.  
  11782. iosobj.clear(ios::colon.::colon.colon.::colon.::colon.badbit|iosobj.rdstate());
  11783. bit ( want; 
  11784.  
  11785. bits to  with,. int  ;iosbitwithbitsothersetsofbitsof) 
  11786.  
  11787. with,.all
  11788. with,you iosobj.all
  11789. with,If For0 sets:
  11790. (you  . and|)example;without:
  11791. (you andrdstate)example;.all
  11792. with,you iosobj: For0 : you .all
  11793.  
  11794. bitwise the with int; set changes bits ios bit with can bits ios bit with 
  11795. clearing  bit ( ;voidiosobj:| ) example ; ORwithoutstatementwant ;
  11796.  
  11797. bits to with,. int changes; ios bit with bits other sets of  .  bits of ; its 
  11798. state |)example;without: bits its state rdstate)example;; void other following 
  11799. colon : one in with ; 
  11800.  
  11801. to ios bit with clearing other leaves  iosobj iosobj : |)bit(OR without 
  11802. statement want; int badbit bit clear rdstate are default unchanged error bits 
  11803. current cleared equals ; void of = of =: clear rdstate ; : 
  11804.  
  11805. clear bits() are;
  11806.  
  11807. bits() error = current If can badbit cleared::and.::and.and.::and.::and.and.all 
  11808. default cleared::and.::and.and.::and.::and.and.bitwise  error  clearing example 
  11809. changes For bit following. equals, colon error 0.  changes bits ios bit with 
  11810.  
  11811. ifstream();
  11812. ifstream(int d);
  11813. ifstream(const char* fname,
  11814.          int mode=ios&c2.in,
  11815.          int prot=filebuf&c2.openprot);
  11816. ifstream(int d, char* p, int len);
  11817.  
  11818. There are four versions of the ifstream constructor. The first version takes no 
  11819. arguments and constructs an unopened ifstream object. The second version takes 
  11820. one argument and constructs an ifstream object that is attached to the file 
  11821. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  11822. ifs. 
  11823.  
  11824. The third and fourth versions of the ifstream() constructor take three 
  11825. arguments. The third version constructs an ifstream object and opens the file 
  11826. fname with open mode equal to mode and protection mode equal to prot. The 
  11827. default value for mode is ios&c2.in, and the default value for prot is 
  11828. filebuf&c2.openprot. If the file cannot be opened, the error state of the 
  11829. constructed ifstream object is set. 
  11830.  
  11831. The fourth version constructs an ifstream object that is attached to the file 
  11832. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  11833. ifs. This constructor also sets up an associated filebuf object with a stream 
  11834. buffer that has length len bytes and begins at the position pointed to by p. If 
  11835. p is equal to 0 or len is equal to 0, the associated filebuf object is 
  11836. unbuffered. 
  11837.  
  11838. int eof() const;
  11839.  
  11840. eof() returns a nonzero value if 
  11841. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is set in the error state 
  11842. of iosobj. Otherwise, it returns 0. 
  11843. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is usually set when an 
  11844. EOF has been encountered during an extraction operation. been .  : : been . : : 
  11845. been . been . eofhasiseofbitnonzeroduringit .ios ,ifiosobj0 
  11846. .int iosobjencountered ios  .(usuallyausually: error   0  , iosobj ) 0an ; been ;if 0eofbit
  11847.  
  11848. ,.an
  11849. , set.an
  11850. ,of nonzero0 :
  11851. ( been)is;:
  11852. ( been)is;.an
  11853. , set: nonzero0 :  .an
  11854.  
  11855. eof Otherwise; eofbit encountered returns during 
  11856. ;EOFencounteredreturnsduringhastheset ;set:) is ; when;
  11857.  
  11858. encountered ,. Otherwise eofbit; returns during ( encountered usually 
  11859. encountered usually ;state) is ; :encounteredstate) is ; ;itif:valueoperation;
  11860.  
  11861. returns during has the set; set : )is;when ; Otherwise const during error colon 
  11862. int iosobj encountered in extraction ios ; usually a usually a: error ; . ( a 0 
  11863. ) ; 
  11864.  
  11865. error() eofbit iosobj usually .  . of ios 0 (state int), an usually encountered 
  11866. operation iosobj colon extraction. of value usually encountered has encountered 
  11867. operation iosobj , EOF eof when during in iosobj . nonzero is, it 
  11868. returns::if.::if.if.::if.::if.if.const operation set been the an encountered : 
  11869.  
  11870. set.error(returns::if.::if.if.::if.::ifduring(.constset.());
  11871. during ( ; 
  11872.  
  11873. encountered  ,. Otherwise  ;returnsduringencounteredusuallyencounteredusually
  11874.  
  11875. ,.an
  11876. , set.an
  11877. ,of nonzero0 :
  11878. (  . been)is;:
  11879. ( been)is;.an
  11880. , set: nonzero0 :  .an
  11881.  
  11882. eof Otherwise; eofbit encountered returns during during ( EOF encountered 
  11883. returns during has  during ( ;set:) is ; when;
  11884.  
  11885. encountered ,. Otherwise eofbit; returns during encountered usually  . 
  11886. encountered usually ;state) is ; :encounteredstate) is ; ;itif:valueoperation;
  11887.  
  11888. returns during has the  set during(set:) during ( when; Otherwise const during 
  11889. error colon int iosobj encountered in extraction ios ; usually a usually a: 
  11890. error ; : 
  11891.  
  11892. error encountered() colon;
  11893.  
  11894. encountered() iosobj a in of EOF const extraction::been.::been.: been . : : 
  11895. been . been . anintextraction : : been . : : been . been . : : been . : : been 
  11896. . been . eof iosobj hasiseofbitnonzeroduringit .ios ,ifiosobj0 
  11897. . eofbitencounteredreturnsduring) 
  11898.  
  11899. ,.an
  11900. , set.an
  11901. ,of nonzero0 :
  11902. ( been)is;:
  11903. ( been)is;.an
  11904. , set: nonzero0 :  .an
  11905.  
  11906. eof Otherwise; eofbit encountered returns during ; EOF encountered returns 
  11907. during has the set; set : )is;when ; 
  11908.  
  11909. encountered ,. Otherwise eofbit; returns during encountered usually encountered 
  11910. usually ; state )is;: encountered state )is;; :valueoperation;
  11911.  
  11912. returns during has the set; set : )is;when ; Otherwise const during error colon 
  11913. int iosobj encountered in extraction ios ; usually usually a: error ; int 
  11914.  
  11915. int eof() const;
  11916.  
  11917. eof() returns a nonzero value if 
  11918. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is set in the error state 
  11919. of iosobj. Otherwise, it returns 0. 
  11920. ios::colon.::colon.colon.::colon.::colon.colon.eofbit  is usually set when an 
  11921. EOF has been encountered during an extraction operation. .  been .  : : been . 
  11922. : : been . been . eofhasiseofbitnonzeroduringit .ios ,ifiosobj0 
  11923. .int iosobjencountered ios  .(usuallyausually: error   0 
  11924.  
  11925. ,.an
  11926. , set.an
  11927. ,of nonzero0 :
  11928. ( been)is;:
  11929. ( been)is;.an
  11930. , set: nonzero0 :  .an
  11931.  
  11932. eof Otherwise; eofbit encountered returns during 
  11933. ;EOFencounteredreturnsduringhastheset ;set:) is ; when;
  11934.  
  11935. encountered ,. Otherwise eofbit; returns during ( encountered usually 
  11936. encountered usually ;state) is ; :encounteredstate) is ; ;itif:valueoperation;
  11937.  
  11938. returns during has the set; set : )is;when ; Otherwise const during error colon 
  11939. int iosobj encountered in extraction ios ; usually a usually a: error ; . ( a 0 
  11940. ) ; 
  11941.  
  11942. error() eofbit iosobj usually .  . of ios 0 (state int), an usually encountered 
  11943. operation iosobj colon extraction. of value usually encountered has encountered 
  11944. operation iosobj , EOF eof when during in iosobj . nonzero is, it 
  11945. returns::if.::if.if.::if.::if.if.const operation set been the an encountered : 
  11946.  
  11947. set.error(returns::if.::if.if.::if.::ifduring(.constset.());
  11948. during ( ; 
  11949.  
  11950. encountered  ,. Otherwise  ;returnsduringencounteredusuallyencounteredusually
  11951.  
  11952. ,.an
  11953. , set.an
  11954. ,of nonzero0 :
  11955. (  . been)is;:
  11956. ( been)is;.an
  11957. , set: nonzero0 :  .an
  11958.  
  11959. eof Otherwise; eofbit encountered returns during during ( EOF encountered 
  11960. returns during has  during ( ;set:) is ; when;
  11961.  
  11962. encountered ,. Otherwise eofbit; returns during encountered usually  . 
  11963. encountered usually ;state) is ; :encounteredstate) is ; ;itif:valueoperation;
  11964.  
  11965. returns during has the  set during(set:) during ( when; Otherwise const during 
  11966. error colon int iosobj encountered in extraction ios ; usually a usually a: 
  11967. error ; : 
  11968.  
  11969. error encountered() colon;
  11970.  
  11971. encountered() iosobj a in of EOF const extraction::been.::been.: been . : : 
  11972. been . been . anintextraction : : been . : : been . been . : : been . : : been 
  11973. . been . eof iosobj hasiseofbitnonzeroduringit .ios ,ifiosobj0 
  11974. . eofbitencounteredreturnsduring) 
  11975.  
  11976. ,.an
  11977. , set.an
  11978. ,of nonzero0 :
  11979. ( been)is;:
  11980. ( been)is;.an
  11981. , set: nonzero0 :  .an
  11982.  
  11983. eof Otherwise; eofbit encountered returns during ; EOF encountered returns 
  11984. during has the set; set : )is;when ; 
  11985.  
  11986. encountered ,. Otherwise eofbit; returns during encountered usually encountered 
  11987. usually ; state )is;: encountered state )is;; :valueoperation;
  11988.  
  11989. returns during has the set; set : )is;when ; Otherwise const during error colon 
  11990. int iosobj encountered in extraction ios ; usually usually a: error ; int 
  11991.  
  11992. int eof() const;
  11993.  
  11994. eof() returns a nonzero value if 
  11995. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is set in the error state 
  11996. of iosobj. Otherwise, it returns 0. 
  11997. ios::colon.::colon.colon.::colon.::colon.colon.eofbit  is usually set when an 
  11998. EOF has been encountered during an extraction operation. .  been .  : : been . 
  11999. : : been . been . eofhasiseofbitnonzeroduringit .ios ,ifiosobj0 
  12000. .int iosobjencountered ios  .(usuallyausually: error   0 
  12001.  
  12002. ifstream();
  12003. ifstream(int d);
  12004. ifstream(const char* fname,
  12005.          int mode=ios&c2.in,
  12006.          int prot=filebuf&c2.openprot);
  12007. ifstream(int d, char* p, int len);
  12008.  
  12009. There are four versions of the ifstream constructor. The first version takes no 
  12010. arguments and constructs an unopened ifstream object. The second version takes 
  12011. one argument and constructs an ifstream object that is attached to the file 
  12012. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  12013. ifs. 
  12014.  
  12015. The third and fourth versions of the ifstream() constructor take three 
  12016. arguments. The third version constructs an ifstream object and opens the file 
  12017. fname with open mode equal to mode and protection mode equal to prot. The 
  12018. default value for mode is ios&c2.in, and the default value for prot is 
  12019. filebuf&c2.openprot. If the file cannot be opened, the error state of the 
  12020. constructed ifstream object is set. 
  12021.  
  12022. The fourth version constructs an ifstream object that is attached to the file 
  12023. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  12024. ifs. This constructor also sets up an associated filebuf object with a stream 
  12025. buffer that has length len bytes and begins at the position pointed to by p. If 
  12026. p is equal to 0 or len is equal to 0, the associated filebuf object is 
  12027. unbuffered. 
  12028.  
  12029. int fail() const;
  12030.  
  12031. fail() returns a nonzero value if either 
  12032. ios::colon.::colon.colon.::colon.::colon.colon.badbit or 
  12033. ios::colon.::colon.colon.::colon.::colon.colon.failbit is set in the error 
  12034. state. Otherwise, it returns 0. if failbit error nonzero returns . the set, 
  12035. state ::it.::it.it.::it.::it.it.either colon badbit  fail : 
  12036.  
  12037. .int(::it.::it.it.::it.error(.either.());
  12038. error ( ; 
  12039.  
  12040. fail  ,.  ;errorfailfail
  12041.  
  12042. badbit
  12043. , .badbit
  12044. ,value the0 :
  12045. (  . colon)set;:
  12046. ( colon)set;.badbit
  12047. , : the0 :  .badbiteither
  12048.  
  12049. failbit;infailerror error(iffailerroris error(; : )set;;
  12050.  
  12051. fail,. in; error fail  .  fail  ;) set ; :fail) set ; returns ; state it : ;
  12052.  
  12053. erroris error ( : )error( ; either error int const or (returnsfailnonzeroiosOtherwise;aa :int;:
  12054.  
  12055. int fail() const;
  12056.  
  12057. fail() returns a nonzero value if either ios::colon.::colon.: colon . : : colon 
  12058. . colon . badbitorios : : colon . : : colon . colon . : : colon . : : colon . 
  12059. colon . failbit returns issetintheerrorstate .Otherwise ,itreturns0 
  12060. . infailerror) 
  12061.  
  12062. ,.badbit
  12063. , .badbit
  12064. ,value the0 ( colon)set;:
  12065. ( colon)set;.badbit
  12066. , : the0 :  .badbit
  12067.  
  12068. failbit ; in fail error ; error is ; : )set;; 
  12069.  
  12070. fail ,. in; error fail fail ; )set;: fail )set;; state  :;
  12071.  
  12072. error is ; : )set;; either error int const or returns fail nonzero ios 
  12073. Otherwise ;   a: int ; or 
  12074.  
  12075. or failbit() either;
  12076.  
  12077. failbit() a the it Otherwise::const.::const.const.::const.::const.const.in set 
  12078. nonzero int value returns. , state 0. 
  12079. Otherwise::const.::const.const.::const.::const.const.in 
  12080.  
  12081. ,.badbit
  12082. , .badbit
  12083. ,value the0 :
  12084. ( colon)set;:
  12085. ( colon)set;.badbit
  12086. , : the0 :
  12087.  
  12088.  
  12089. ΓòÉΓòÉΓòÉ <hidden> n.colon.::colon.::colon.colon.failbit and ios::colon.::co ΓòÉΓòÉΓòÉ
  12090.  
  12091.  . badbit 
  12092.  
  12093. failbit ; in fail error ; if fail error is ; : )set;; 
  12094.  
  12095. fail ,. in; error fail fail ; )set;: fail ) set ; ;stateit:;
  12096.  
  12097. error is ; : )set;; either error int returns fail nonzero ios Otherwise ; a a: 
  12098. int ; : colon . colon . : : colon . : : colon . colon . badbitorios : : colon . 
  12099. : : colon . colon . : : colon . : : colon . colon . failbitissetintheerrorstate 
  12100. .Otherwise ,itreturns0 . iffailbiterrornonzeroreturns.theset ,state: : : it . 
  12101. it . : : it . : : it . it . eithercolonbadbit fail:
  12102.  
  12103. .int(::it.::it.it.::it.: error(.either.());
  12104. error ( ; 
  12105.  
  12106. fail ,.  ;errorfailfail
  12107.  
  12108.  badbit
  12109. , .badbit
  12110. ,value the0 :
  12111. ( . colon)set;:
  12112. ( colon)set;.badbit
  12113. , : the0 :  .badbit
  12114.  either
  12115.  
  12116. failbit;infailerror error(iffailerroriserror(; : )set;;
  12117.  
  12118. fail ,. in; error fail . fail ; )set;: fail )set; returns ; state it : ;
  12119.  
  12120. erroriserror ( : )error( ; either error int const or a :int;:
  12121.  
  12122. int fail() const;
  12123.  
  12124. fail() returns a nonzero value if either 
  12125. ios::colon.::colon.colon :colon.::colon.colon.badbit or 
  12126. ios::colon.::colon.colon.::colon.::colon.colon.returns  is set in the error 
  12127. state. Otherwise, it returns 0.  in fail error )
  12128.  
  12129. ,.badbit
  12130. , .badbit
  12131. ,value the0  ( colon)set;:
  12132. ( colon)set;.badbit
  12133. ,,.(: the0 :  .badbit
  12134.  
  12135. failbit ; in fail error ; if  error is ; : ; ;
  12136.  
  12137. fail ,. in; error fail  fail ; ) )set;: fail )set;; state  :;
  12138.  
  12139. error  is ; : )set;returns  ; either error int const or returns fail nonzero 
  12140. ios Otherwise ; 
  12141.  
  12142. failbit() a the it Otherwise::const.::const.const.::const.::const.const.in set 
  12143. nonzero int value returns.  ,state0 .Otherwise : : const . : : const . const . 
  12144. : : const . : : const . const . inreturns ) if is colon fail error badbit ios . 
  12145. .  colon .  : : colon . : : colon . colon . failbitissetintheerrorstate 
  12146. .Otherwise ,itreturns0 .or returnsfail Otherwise  .(a
  12147.  
  12148. ,.badbit
  12149. , .badbit
  12150. ,value the0 :
  12151. ( colon)set;:
  12152. ( colon)set;.badbit
  12153. , : the0 :   .badbit
  12154.  
  12155. failbit ; in fail error ; if fail error is ; : )set;; 
  12156.  
  12157. fail ,. in; error fail fail ; )set;: fail ) set ; ;stateit:;
  12158.  
  12159. error is ; : )set;; either error int returns fail nonzero ios Otherwise ; a a: 
  12160. int ; : colon . colon . : : colon . : : colon . colon . badbitorios : : colon . 
  12161. : : colon . colon . : : colon . : : colon . colon . failbitissetintheerrorstate 
  12162. .Otherwise ,itreturns0 . iffailbiterrornonzeroreturns.theset ,state: : : it . 
  12163. it . : : it . : : it . it . eithercolonbadbit fail:
  12164.  
  12165. .int(::it.::it.it.::it.: error(.either.());
  12166. error ( ; 
  12167.  
  12168. fail ,.  ;errorfailfail
  12169.  
  12170.  badbit
  12171. , .badbit
  12172. ,value the0 :
  12173. ( . colon)set;:
  12174. ( colon)set;.badbit
  12175. , : the0 :  .badbit
  12176.  either
  12177.  
  12178. failbit;infailerror error(iffailerroriserror(; : )set;;
  12179.  
  12180. fail ,. in; error fail . fail ; )set;: fail )set; returns ; state it : ;
  12181.  
  12182. erroriserror ( : )error( ; either error int const or
  12183.  
  12184. ifstream();
  12185. ifstream(int d);
  12186. ifstream(const char* fname,
  12187.          int mode=ios&c2.in,
  12188.          int prot=filebuf&c2.openprot);
  12189. ifstream(int d, char* p, int len);
  12190.  
  12191. There are four versions of the ifstream constructor. The first version takes no 
  12192. arguments and constructs an unopened ifstream object. The second version takes 
  12193. one argument and constructs an ifstream object that is attached to the file 
  12194. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  12195. ifs. 
  12196.  
  12197. The third and fourth versions of the ifstream() constructor take three 
  12198. arguments. The third version constructs an ifstream object and opens the file 
  12199. fname with open mode equal to mode and protection mode equal to prot. The 
  12200. default value for mode is ios&c2.in, and the default value for prot is 
  12201. filebuf&c2.openprot. If the file cannot be opened, the error state of the 
  12202. constructed ifstream object is set. 
  12203.  
  12204. The fourth version constructs an ifstream object that is attached to the file 
  12205. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  12206. ifs. This constructor also sets up an associated filebuf object with a stream 
  12207. buffer that has length len bytes and begins at the position pointed to by p. If 
  12208. p is equal to 0 or len is equal to 0, the associated filebuf object is 
  12209. unbuffered. 
  12210.  
  12211. void clear(int state=0);
  12212.  
  12213. clear() changes the error state of iosobj to state. If state equals 0 (its 
  12214. default), all of the bits in the error state are cleared. If you want to set 
  12215. one of the bits without clearing the other bits in the error state, you can 
  12216. bitwise OR the bit you want to set with the current error state. For example, 
  12217. the following statement sets 
  12218. ios::colon.::colon.colon.::colon.::colon.colon.badbit in iosobj and leaves all 
  12219. the other error state bits unchanged: 
  12220.  
  12221. iosobj.clear(ios::colon.::colon.colon.::colon.::colon.colon.badbit|iosobj.rdstate());
  12222.  
  12223. with,.all
  12224. with,you iosobj.all
  12225. with,If For0 sets:
  12226. (you and|)example;without:
  12227. (you andrdstate)example;.all
  12228. with,you iosobj: For0 : you  with , .intchanges ;iosbitsothersetsofbitsof;itsstate| ) example ; without :bitsitsstate )example;; void other following colon : one in with ;
  12229.  
  12230. toiosbitwithclearingotherleavesiosobj ;voidiosobj:| ) example ; ORwithoutstatementwant ;intbadbitbitclearrdstateare unchangederrorbitscurrentclearedequals;voidof=of= :clearrdstate;state youcanbitwiseORthebityouwanttosetwiththecurrenterrorstate .Forexample ,thefollowingstatementsetsios : : colon  : colon . colon . : : colon . : : colon . colon . badbitiniosobjandleavesalltheother bitsunchanged :
  12231.  
  12232. iosobj.clear(ios::colon.::colon.colon.::colon.: .badbit|iosobj.rdstate());
  12233. bit ( want; 
  12234.  
  12235. bits to  with,. int  ;iosbitwithbitsothersetsofbitsof
  12236.  
  12237. with all
  12238. with,you iosobj.all
  12239. with,If For0 sets:
  12240. (you  . and|)example;without:
  12241. (you andrdstate)example;.all
  12242. with,you iosobj: For0 : you .all
  12243.  badbit
  12244.  
  12245. bitwisethewithint ;setchangesbitsiosbitwith canbitsiosbitwithclearing bit(; void iosobj : |)example;OR without statement want;
  12246.  
  12247. bitsto ,. int changes; ios bit with bits other sets of  .  bits of  ;itsstate| ) example ; without :bitsitsstaterdstate ) example ;  error  ;voidotherfollowingcolon:oneinwith;
  12248.  
  12249. toiosbitwithclearingotherleaves iosobjiosobj:| ) bit ( ORwithout want ;intbadbitbitclearrdstatearedefaultunchanged andrdstate)example;.all
  12250. with,you iosobj: For0 : you .all
  12251.  
  12252. bitwise the with int; set changes bits ios bit with can bits ios bit with 
  12253. clearing other leaves iosobj; void iosobj : |)example;OR without statement 
  12254. want; 
  12255.  
  12256. bits to with,. int changes; ios bit with bits other sets of bits of ; its state 
  12257. |)example;without: bits its state rdstate)example;; void other following colon 
  12258. : one in with ; 
  12259.  
  12260. to ios bit with clearing other leaves iosobjiosobj : |)example;OR without 
  12261. statement want; int badbit bit clear rdstate are default unchanged error bits 
  12262. current cleared equals ; void of = of =: clear rdstate ; bit ( 
  12263.  
  12264. void clear(int state=0);
  12265.  
  12266. clear() changes the error state of iosobj to state. If state equals 0 (its 
  12267. default), all of the bits in the error state are cleared. If you want to set 
  12268. one of the bits without clearing the other bits in the error state, you can 
  12269. bitwise OR error  the bit you want to set with the current error state. For 
  12270. example, the following statement sets 
  12271. ios::colon.::colon.colon.::colon.::colon.colon.badbit in iosobj and leaves all 
  12272. the other error state bits unchanged: 
  12273.  
  12274. iosobj.clear(ios::colon.::colon.colon.::colon.::colon.colon.badbit|iosobj.rdstate());
  12275.  . : : are . are . changes
  12276.  
  12277. with,.all
  12278. with,you iosobj.all
  12279. with,If For0 sets:
  12280. (you and|)example;without:
  12281. (you andrdstate)example;.all
  12282. with,you iosobj: For0 : you  with , .intchanges ;iosbitsothersetsofbitsof;itsstate| ) example ; without :bitsitsstate )example;; void other following colon : one in with ;
  12283.  
  12284. toiosbitwithclearingotherleavesiosobj ;voidiosobj:| ) example ; ORwithoutstatementwant ;intbadbitbitclearrdstateare unchangederrorbitscurrentclearedequals;voidof=of= :clearrdstate;state youcanbitwiseORthebityouwanttosetwiththecurrenterrorstate .Forexample ,thefollowingstatementsetsios : : colon  : colon . colon . : : colon . : : colon . colon . badbitiniosobjandleavesalltheother bitsunchanged :
  12285.  
  12286. iosobj.clear(ios::colon.::colon.colon.::colon.:
  12287.  
  12288. ifstream();
  12289. ifstream(int d);
  12290. ifstream(const char* fname,
  12291.          int mode=ios&c2.in,
  12292.          int prot=filebuf&c2.openprot);
  12293. ifstream(int d, char* p, int len);
  12294.  
  12295. There are four versions of the ifstream constructor. The first version takes no 
  12296. arguments and constructs an unopened ifstream object. The second version takes 
  12297. one argument and constructs an ifstream object that is attached to the file 
  12298. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  12299. ifs. 
  12300.  
  12301. The third and fourth versions of the ifstream() constructor take three 
  12302. arguments. The third version constructs an ifstream object and opens the file 
  12303. fname with open mode equal to mode and protection mode equal to prot. The 
  12304. default value for mode is ios&c2.in, and the default value for prot is 
  12305. filebuf&c2.openprot. If the file cannot be opened, the error state of the 
  12306. constructed ifstream object is set. 
  12307.  
  12308. The fourth version constructs an ifstream object that is attached to the file 
  12309. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  12310. ifs. This constructor also sets up an associated filebuf object with a stream 
  12311. buffer that has length len bytes and begins at the position pointed to by p. If 
  12312. p is equal to 0 or len is equal to 0, the associated filebuf object is 
  12313. unbuffered. 
  12314.  
  12315. int eof() const;
  12316.  
  12317. eof() returns a nonzero value if 
  12318. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is set in the error state 
  12319. of iosobj. Otherwise, it returns 0. 
  12320. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is usually set when an 
  12321. EOF has been encountered during an extraction operation.  been ) is ; . an 
  12322. ,  set :  nonzero 0  :   . an 
  12323.  
  12324. eof Otherwise; eofbit encountered returns during 
  12325. during(EOFencounteredreturnsduringhastheset ;set:) is ; when; 
  12326.  
  12327. encountered ,. Otherwise eofbit; returns during encountered usually encountered 
  12328. usually ; state )is;: encountered state )is;iosobj  ;itif:valueoperation;
  12329.  
  12330. returns during has the setduring ( set : )is;when ; Otherwise const during 
  12331. error colon int iosobj encountered in extraction ios ; usually a usually a: 
  12332. error ; during ( 
  12333.  
  12334.  error(Otherwise a0);
  12335.  
  12336. error() eofbit iosobj usually set . of ios 0 (state int), an usually 
  12337. encountered operation iosobj colon extraction. of value usually encountered has 
  12338. iosobj , EOF eof when during ( iosobj  during in iosobj . nonzero is, it 
  12339. returns::if.::if.if.::if.::if.if.const operation set been the an iosobj 
  12340. encountered : 
  12341.  
  12342. set.error(returns::if.::if.if.::if.::if.if.constset.());
  12343. . : : colon . colon . eofbit
  12344.  
  12345. ,.an
  12346. , set.an
  12347. ,of nonzero0 :
  12348. ( been)is;:
  12349. ( been)is;.an
  12350. , set: nonzero0 :  ; EOF encountered returns during has the set; set : )is;when ;
  12351.  
  12352. encountered , .Otherwiseeofbit ;returnsduring(encounteredusuallyencounteredusually; state )is;: encountered state  ) is ; ;itif:valueoperation;
  12353.  
  12354. returnsduringhastheset ;set:) is ; when;Otherwiseconstduringerrorcolon iosobjencounteredinextractionios;usuallyausuallya :error;:been.::been.been.an int extraction::been.::been.been.::been.::been.been.eof has is eofbit nonzero during it. ios, if iosobj 0.  EOF eof when during in iosobj . nonzero is, it returns::if :if.if.::if.::if.if.const operation set been the an encountered:
  12355.  
  12356. set.error(returns::if.::if.if.::if.: )
  12357.  
  12358. ,.an
  12359. , set.an
  12360. ,of nonzero0 :
  12361. ( been)is;:
  12362. ( been)is;.an
  12363. , set: nonzero0 :.an
  12364.  
  12365. eof Otherwise; eofbit encountered returns during ; EOF encountered returns 
  12366. during has the set; set : )is;when ; 
  12367.  
  12368. encountered ,. Otherwise eofbit; during encountered usually encountered usually 
  12369. ; state )is;: encountered state )is;; it if : value operation ; 
  12370.  
  12371. returns during has the set ;set:) is ; 
  12372. when;Otherwiseconstduringerrorcolonintiosobjencounteredinextractionios;usuallyausuallya :error;)
  12373.  
  12374. int eof()
  12375.  
  12376. eof() returns a nonzero value if 
  12377. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is set in the error state 
  12378. of iosobj. Otherwise, it returns 0. 
  12379. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is usually set when an 
  12380. EOF has been encountered during an extraction operation. 
  12381.   ) is ; . an 
  12382. ,  set :  nonzero 0  :   . an 
  12383.  
  12384. eof Otherwise; eofbit encountered returns during 
  12385. during(EOFencounteredreturnsduringhastheset ;set:) is ; when ;
  12386.  
  12387. encountered ,. Otherwise eofbit; returns during encountered usually encountered 
  12388. usually ; state )is;: encountered state )is; iosobj ; it if : value operation ; 
  12389.  
  12390. returns during has the setduring ( set : )is;when ; Otherwise const during 
  12391. error colon int iosobj encountered in extraction ios ; usually a . ( usually a: 
  12392. error ; during ( 
  12393.  
  12394.  error(Otherwise a0);
  12395.  
  12396. error() eofbit iosobj usually set . of ios 0 (state int), an usually 
  12397. encountered operation iosobj colon extraction. of value usually encountered has 
  12398. iosobj , EOF eof ) when during ( iosobj  during in iosobj . nonzero is, it 
  12399. returns::if.::if.if.::if.::if.if.const operation set been the an iosobj 
  12400. encountered : 
  12401.  
  12402. set.error(returns::if.::if.if.::if.::if.if.constset.());
  12403.  . : : colon . colon . eofbit is usually set when an  iosobj ) EOF has been 
  12404. encountered during an extraction operation. .  been .  : : been . : : been . 
  12405. been . eofhasiseofbitnonzeroduringit .ios ,ifiosobj0 
  12406. .int iosobjencountered ios  .(usuallyausually: error   0 
  12407.  
  12408. ,.an
  12409. , set.an
  12410. ,of nonzero0 :
  12411. ( been)is;:
  12412. ( been)is;.an
  12413. , set: nonzero0 :  ; EOF encountered returns during has the set; set : )is;when ;
  12414.  
  12415. encountered , .Otherwiseeofbit ;returnsduring(encounteredusuallyencounteredusually; state )is;: encountered state  ) is ; ;itif:valueoperation;
  12416.  
  12417. returnsduringhastheset ;set:) is ; when;Otherwiseconstduringerrorcolon iosobjencounteredinextractionios;usuallyausuallya :error;:been.::been.been.an int extraction::been.::been.been.::been.::been.been.eof has is eofbit nonzero during it. ios, if iosobj 0.  EOF eof when during in iosobj . nonzero is, it returns::if :if.if.::if.::if.if.const operation set been the an encountered:
  12418.  
  12419. set.error(returns::if.::if.if.::if.: )
  12420.  
  12421. ,.an
  12422. , set.an
  12423. ,of nonzero0 :
  12424. ( been)is;:
  12425. ( been)is;.an
  12426. , set: nonzero0 :.an
  12427.  
  12428. eof Otherwise; eofbit encountered returns during ; EOF encountered returns 
  12429. during has the set; set : )is;when ; 
  12430.  
  12431. encountered ,. Otherwise eofbit; during encountered usually encountered usually 
  12432. ; state )is;: encountered state )is;; it if : value operation ; 
  12433.  
  12434. returns during has the set ;set:) is ; 
  12435. when;Otherwiseconstduringerrorcolonintiosobjencounteredinextractionios;usuallyausuallya :error;)
  12436.  
  12437. int eof()
  12438.  
  12439. eof() returns a nonzero value if 
  12440. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is set in the error state 
  12441. of iosobj. Otherwise, it returns 0. 
  12442. ios::colon.::colon.colon.::colon.::colon.colon.eofbit is usually set when an 
  12443. EOF has been encountered during an extraction operation. 
  12444.   ) is ; . an 
  12445. ,  set :  nonzero 0  :   . an 
  12446.  
  12447. eof Otherwise; eofbit encountered returns during 
  12448. during(EOFencounteredreturnsduringhastheset ;set:) is ; when
  12449.  
  12450. ifstream();
  12451. ifstream(int d);
  12452. ifstream(const char* fname,
  12453.          int mode=ios&c2.in,
  12454.          int prot=filebuf&c2.openprot);
  12455. ifstream(int d, char* p, int len);
  12456.  
  12457. There are four versions of the ifstream constructor. The first version takes no 
  12458. arguments and constructs an unopened ifstream object. The second version takes 
  12459. one argument and constructs an ifstream object that is attached to the file 
  12460. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  12461. ifs. 
  12462.  
  12463. The third and fourth versions of the ifstream() constructor take three 
  12464. arguments. The third version constructs an ifstream object and opens the file 
  12465. fname with open mode equal to mode and protection mode equal to prot. The 
  12466. default value for mode is ios&c2.in, and the default value for prot is 
  12467. filebuf&c2.openprot. If the file cannot be opened, the error state of the 
  12468. constructed ifstream object is set. 
  12469.  
  12470. The fourth version constructs an ifstream object that is attached to the file 
  12471. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  12472. ifs. This constructor also sets up an associated filebuf object with a stream 
  12473. buffer that has length len bytes and begins at the position pointed to by p. If 
  12474. p is equal to 0 or len is equal to 0, the associated filebuf object is 
  12475. unbuffered. 
  12476.  
  12477. int fail() const;
  12478.  
  12479. fail() returns a nonzero value if either 
  12480. ios::colon.::colon.colon.::colon.::colon.colon.badbit or 
  12481. ios::colon.::colon.colon.::colon.::colon.colon.failbit is set in the error 
  12482. state. Otherwise, it returns 0. returns fail  Otherwise   . ( a 
  12483. :int  0 ,returns)0 badbit;colon; it  0 in a error  :badbit
  12484.  
  12485. ,.badbit
  12486. , .badbit
  12487. ,value the0 :
  12488. ( colon)set;:
  12489. ( colon)set;.badbit
  12490. , : the0 :   .badbit
  12491.  
  12492. failbit ; in fail error  ;iffailerroris;:) set ; ;
  12493.  
  12494. fail ,. in; error ( fail fail  ;) set ; :fail) set ; ;stateit:;
  12495.  
  12496. error is ; : )set; ; either error int returns fail nonzero ios Otherwise ; a a: 
  12497. int ; : colon . colon  : colon . : : colon . colon . badbitorios : : colon . : 
  12498. : colon . colon . : : colon . : : colon . colon . failbitissetintheerrorstate 
  12499. .Otherwise ,itreturns0 . iffailbiterrornonzeroreturns.theset ,state: : : it . 
  12500. it . : : it . : : it . it . eithercolonbadbit fail:
  12501.  
  12502. .int(::it.::it.it.::it.: )
  12503.  
  12504. ,.badbit
  12505. , .badbit
  12506. ,value the0 : colon)set;:
  12507. ( colon)set;.badbit
  12508. , : the0 :  .badbit
  12509.  
  12510. failbit ; in fail error ; if fail is ; : )set;; 
  12511.  
  12512. fail ,. in;  error fail fail ; )set;: fail )set;; state it : ; 
  12513.  
  12514. error a a: int ; ) 
  12515.  
  12516. or failbit() either
  12517.  
  12518. failbit() a the it Otherwise::const.::const.const.::const.::const.const.in set 
  12519. nonzero int value returns. 0. 
  12520. Otherwise::const.::const.const.::const.::const.const.in set badbit if is colon 
  12521. fail error badbit ios . 
  12522.    ) set ; . badbit 
  12523. ,  :  the 0  :    . badbit 
  12524.  
  12525. failbit ; in fail error error(iffailerroris;:) set ;  )
  12526.  
  12527. ,.badbit
  12528. ,
  12529.  
  12530.  
  12531. ΓòÉΓòÉΓòÉ <hidden> n.colon.::colon.::colon.colon.failbit and ios::colon.::co ΓòÉΓòÉΓòÉ
  12532.  
  12533. . ( . badbit 
  12534. , value  the 0  : 
  12535. (  colon ) set ; : 
  12536. (  colon ) set ; . badbit 
  12537. ,  :  the 0  :   . badbit 
  12538.  
  12539. failbit ; in fail error ; if fail error is ; : )set;; 
  12540.  
  12541. fail ,. in; error fail fail ; )set;: fail )set;; it : ; 
  12542.  
  12543. error is ; : )set;; either error int const or nonzero ios Otherwise ; a a: int 
  12544. ; : 
  12545.  
  12546. int fail() const;
  12547.  
  12548. fail() returns a nonzero value if either ios::colon.::colon.colon.::colon.::. 
  12549. badbitorios : : colon . : : colon . colon . : : colon . : : colon . colon . 
  12550. failbitissetintheerrorstate .Otherwise ,itreturns0 .or returnsfail Otherwise  .(a
  12551.  
  12552. ,.badbit
  12553. , .badbit
  12554. ,value the0 :
  12555. ( colon)set;:
  12556. ( colon)set;.badbit
  12557. , : the0 :   .badbit
  12558.  
  12559. failbit ; in fail error  ;iffailerroris;:) set ; ;
  12560.  
  12561. fail ,. in; error ( fail fail  ;) set ; :fail) set ; ;stateit:;
  12562.  
  12563. error is ; : )set; ; either error int returns fail nonzero ios Otherwise ; a a: 
  12564. int ; : colon . colon  : colon . : : colon . colon . badbitorios : : colon . : 
  12565. : colon . colon . : : colon . : : colon . colon . failbitissetintheerrorstate 
  12566. .Otherwise ,itreturns0 . iffailbiterrornonzeroreturns.theset ,state: : : it . 
  12567. it . : : it . : : it . it . eithercolonbadbit fail:
  12568.  
  12569. .int(::it.::it.it.::it.: )
  12570.  
  12571. ,.badbit
  12572. , .badbit
  12573. ,value the0 : colon)set;:
  12574. ( colon)set;.badbit
  12575. , : the0 :  .badbit
  12576.  
  12577. failbit ; in fail error ; if fail is ; : )set;; 
  12578.  
  12579. fail ,. in;  error fail fail ; )set;: fail )set;; state it : ; 
  12580.  
  12581. error a a: int ; ) 
  12582.  
  12583. or failbit() either
  12584.  
  12585. failbit() a the it Otherwise::const.::const.const.::const.::const.const.in set 
  12586. nonzero int value returns. 0. 
  12587. Otherwise::const.::const.const.::const.::const.const.in set badbit if is colon 
  12588. fail error badbit ios . 
  12589.    ) set ; . badbit 
  12590. ,  :  the 0  :    . badbit 
  12591.  
  12592. failbit ; in fail error error(iffailerroris;:) set ;  )
  12593.  
  12594. ,.badbit
  12595. ,.(.badbit
  12596. ,value the0 :
  12597. ( colon)set;:
  12598. ( colon)set;.badbit
  12599. , : the0 :  .badbit
  12600.  
  12601. failbit ; in fail error ; if fail error is ; : )set;; 
  12602.  
  12603. fail ,. in; error fail fail ; )set;: fail )set;; it : ; 
  12604.  
  12605. error is ; : )set;; either error int const or nonzero ios Otherwise ; a a: int 
  12606. ; : 
  12607.  
  12608. int fail() const;
  12609.  
  12610. fail() returns a nonzero value if either ios::colon.::colon.colon.::colon.::. 
  12611. badbitorios : : colon . : : colon . colon . : : colon . : : colon . colon . 
  12612. failbitissetintheerrorstate .Otherwise ,itreturns0 .or returnsfail Otherwise  .(a
  12613.  
  12614. ,.badbit
  12615. , .badbit
  12616. ,value the0 :
  12617. ( colon)set;:
  12618. ( colon)set;.badbit
  12619. , : the0 :   .badbit
  12620.  
  12621. failbit ; in fail error  ;iffailerroris;:) set ; ;
  12622.  
  12623. fail ,. in; error ( fail fail  ;) set ; :fail) set ; ;stateit:;
  12624.  
  12625. error is ; : )set; ; either error int returns fail nonzero ios Otherwise ; a a: 
  12626. int ; 
  12627.  
  12628. ifstream();
  12629. ifstream(int d);
  12630. ifstream(const char* fname,
  12631.          int mode=ios&c2.in,
  12632.          int prot=filebuf&c2.openprot);
  12633. ifstream(int d, char* p, int len);
  12634.  
  12635. There are four versions of the ifstream constructor. The first version takes no 
  12636. arguments and constructs an unopened ifstream object. The second version takes 
  12637. one argument and constructs an ifstream object that is attached to the file 
  12638. descriptor d. If d is not open, ios&c2.failbit is set in the format state of 
  12639. ifs. 
  12640.  
  12641. The third and fourth versions of the ifstream() constructor take three 
  12642. arguments. The third version constructs an ifstream object and opens the file 
  12643. fname with open mode equal to mode and protection mode equal to prot. The 
  12644. default value for mode is ios&c2.in, and the default value for prot is 
  12645. filebuf&c2.openprot. If the file cannot