Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use the advanced level of I _ ramp O in C _ jump _ Candle +

Shulou Source: shulou.com Published: 2022-06-03 19:34:56 09月22日 Update

This article will give you a detailed explanation on how to use the advanced use of Ipicuro in Chammer Craft +. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

Overview

The input (input stream) and output (output stream) of C++ are byte sequences that enable data to be transferred sequentially from one object to another. Stream represents the flow of quantitative information from source to destination.

The inputs and outputs of the C++ include:

Standard Icano: input to standard equipment specified by the system

File Icano: input and output to disk files

String Icano: input and output to a specified space in memory

Ipaw O class library

IMap O stream class library:

The header file is the interface between the program and the class library. The interface of the iostream class library is implemented by different files.

Commonly used header files:

Iostream: contains basic information about how to operate on iCompo

Fstream: Icano operation for user-managed files

Strstream: Igamo operation for string streams

Stdiostream: a mechanism for mixed use of C and C++

Iomanip: actions when using formatted Ibank O

Overloading in Ipaw O

In the previous article, we used to implement the output and input of the console.

Overloaded for the output and input of standard type data:

It was originally the left and right shift operators in C++.

Overloaded in the iostream header file

When using it, we must # include

Member functions that overload the displacement operator in the input stream and output stream classes, including:

When ostream operator extracts data from a stream, it usually skips white space characters in the stream, such as spaces, tab keys, line breaks, etc.

Only after entering the data and pressing enter, the data is sent into the keyboard buffer to form the input stream. Extract operator > > to extract data from it

The program will continuously obtain data from the keyboard buffer.

When an invalid character or file Terminator ^ Z is encountered, cin cannot extract data properly, is in an error state, and returns a value of 0 (false)

Case

Enter an uncertain number of grades:

# include # include using namespace std;int main () {/ / define variable double grade; cout > grade) {if (grade > = 85) {cout

Tags: Output input data characters files objects functions standards information buffers buffers displays types memory programs devices operators controls operations console Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Linux vpn Shulou Tech Info Huawei