C ++ Study Notes (1) -- C ++ getting started

Source: Internet
Author: User

Chapter 1
, Quick Start

1.1. Simple
C ++
Program

1,
Main
Function is
(
Unique
)
The returned value of a function that is displayed and called by the operating system must be
Int
Type.

1.2 Input and Output

1,
Iostream
The basis of the database is
Istream
And
Ostream
Two classes. Four classes are defined in the standard library.
Io
Object, which is
CIN
,
Cout
,
Cerr
,
Clog
, Where
Clog
General information used to generate program execution.

2.
<
Operator, which accepts two operands. The left operand must be
Ostream
Object, which writes operations
Ostream
Object;
>
Operator that accepts two operands. The value on the left must be
Istream
Object from
Istream
The read data is stored in the right operand. Both return their left operands.

3.
C ++
.

1.3 comments
(
No Important Content
....)

1.4 Control Structure

1. When using
Istream
When an object is used as a condition, the result is the status of the test flow. If the stream is valid
(
That is, it is possible to read the next input.
)
, The test is successful. If a file terminator or invalid input is encountered
Istream
Invalid.

1.5 class Introduction

1,
Endl
The function is to refresh the buffer.

 

(To be continued)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.