Copyright (C) 2000-2012 |
GNU Info (gmp.info)C++ Formatted InputC++ Formatted Input =================== The following functions are provided in `libgmpxx', which is built only if C++ support is enabled (Note: Build Options). Prototypes are available from `<gmp.h>'. - Function: istream& operator>> (istream& STREAM, mpz_t ROP) Read ROP from STREAM, using its `ios' formatting settings. - Function: istream& operator>> (istream& STREAM, mpq_t ROP) Read ROP from STREAM, using its `ios' formatting settings. An integer like `123' will be read, or a fraction like `5/9'. If the fraction is not in canonical form then `mpq_canonicalize' must be called (Note: Rational Number Functions). - Function: istream& operator>> (istream& STREAM, mpf_t ROP) Read ROP from STREAM, using its `ios' formatting settings. Hex or octal floats are not supported, but might be in the future. These operators mean that GMP types can be read in the usual C++ way, for example, mpz_t z; ... cin >> z; But note that `istream' input (and `ostream' output, Note: C++ Formatted Output) is the only overloading available and using for instance `+' with an `mpz_t' will have unpredictable results. automatically generated by info2www version 1.2.2.9 |