When the path is long and obstructed, it will come. It never rains but it pours. Come on, SAO Nian!

preface

Based on C++ Primer; In my opinion, communication between us must be based on a standard, so that we can communicate with each other and understand what each other is saying. Tip: Good at using Ctrl + F shortcut keys, quick search related content oh!

The body of the

  • Argument (argument, argument) : the value passed to a function;

  • Assignment: To erase the current value of an object and replace it with a new value;

  • Block: a sequence of zero or more statements, enclosed in curly braces;

  • Buffer: A storage area used to hold data. IO facilities typically store input (or output) data in a buffer, and the actions of reading and writing the buffer are independent of the actions in the program. We can explicitly flush the output buffer to force data from the buffer to be written to the output device. By default, reading CIN refreshes Cout; Cout is also refreshed when the program terminates abnormally;

  • Built-in type: a type defined by the language, such as int.

  • Cerr: An Ostream object associated with standard error, usually written to the same device as standard output. By default, data written to CERR is not buffered. Cerr is usually used to output error messages or other output that is not part of the normal logic of a program;

  • Character String literal: Another name for the term string literal;

  • Cin: an istream object to read data from standard input;

  • Class: A mechanism for defining your own data structures and their associated operations. Classes are one of the most fundamental features of C++. Library types such as istream and ostream are classes;

  • Class type: The type defined by the class. The class name is the type name.

  • Clog: An Ostream object associated with a standard error. By default, data written to cloG is buffered. Clogs are typically used to report program execution information, stored in a log file.

  • Comment: Program text ignored by the compiler. C++ has two types of comments: single-line comments and delimiter pair comments. Single-line comments start with //, and everything from // to the end of the line is a comment. The delimiter begins a comment with /*, and everything thereafter is a comment until */ is encountered.

  • Condition: An expression that evaluates to true or false. False is usually represented by a value of 0 and true by a non-zero value.

  • Cout: An ostream object used to write data to standard output. Usually used for the normal output of a program.

  • Curly brace: Curly brace is used to delimit block boundaries. The open curly brace ({) starts the program block and the close curly brace (}) ends it.

  • Data structure: A logical combination of data and the operations allowed on it.

  • Edit-compile-debug: The development process of making a program execute correctly.

  • End-of-file: system-specific identifier indicating that there is no more data in the file.

  • Expression: The smallest unit of computation. An expression contains one or more operands, and often one or more operators. Expression evaluation produces a result. For example, if I and j are int objects, then I + j is an expression that produces the sum of two int values.

  • For statement: An iterative statement that provides the ability to execute repeatedly. Usually used to execute a calculation a specified number of times.

  • Function: named unit of computation.

  • Function body: A block of statements that defines the actions performed by the function.

  • Function name: The name by which the function is known and used to make the function call.

  • Header: A mechanism for making the definition of a class or other name available to more than one program. The program uses header files through the #include directive.

  • If statement: Conditional execution based on the value of a particular condition. If the condition is true, the body of the if statement is executed. Otherwise, the else body, if present, is executed.

  • Initialize: Assigning a value to an object when it is created.

  • Iostream headers: Standard library types that provide stream-oriented input and output.

  • Istream: Library type that provides flow-oriented input.

  • Library Type: a type defined by the standard library, such as istream.

  • Main: a function called when the operating system executes a C++ program. Each program must have one and only one function named main.

  • A manipulator object, such as STD ::endl, is used to “manipulate” the flow itself while reading or writing to it.

  • Member functions: Class-defined operations. Member functions are usually called to manipulate specific objects.

  • Method: Term synonymous with a member function.

  • Namespace: Mechanism for putting the names of library definitions in a single location. Namespaces can help avoid inadvertent name conflicts. The C++ library defines names in the namespace STD.

  • Ostream: Standard library type that provides stream-oriented output.

  • Parameter list: Part of a function definition that indicates what arguments can be used when a function is called, possibly an empty list.

  • Return Type: The type of the value returned by the function.

  • Source file: a file that contains a C++ program.

  • Standard Error: Output stream for reporting errors. Standard output and standard error are usually associated with the window in which the program executes.

  • Standard input: A stream of input, usually associated with the window in which a program is executed.

  • Standard library: a collection of types and functions that every C++ compiler must support. The standard library provides the types that support IO operations. C++ programmers tend to refer to the entire library as “library” and to specific parts of the library as library types, such as “iostream library” for the part of the library that defines IO classes.

  • Standard Output: Output stream, usually associated with the window in which a program is executed.

  • Statement: Part of a program that specifies what action to take when the program executes. An expression followed by a semicolon is a statement; Other types of statements include statement blocks, if statements, for statements, and while statements, all of which contain other statements.

  • STD: The namespace used by the standard library. STD ::cout means we want to use the name cout defined in the namespace STD.

  • String literal: A sequence of zero or more characters, surrounded by double quotes (“a string literal”).

  • Uninitialized variable: A variable that has no initial value assigned. Variables of a class type that do not specify an initial value are initialized as specified by the class definition. Variables of built-in type defined inside a function are not initialized by default unless there is an explicit initialization statement. It is an error to attempt to use the value of an uninitialized variable. Uninitialized variables are a common cause of bugs.

  • Variables: named objects.

  • While statement (while statement) : An iterative statement that provides a mechanism for repeated execution until a particular condition is false. The loop executes zero or more times, depending on how the loop condition evaluates.

  • () operator (() operator) : Call operator. The parentheses “()” following the function name act as a call to the function. Arguments passed to the function are placed in parentheses.

  • ++ operator: incrementing operator. Add the value of the operand by 1, ++ I is equivalent to I = I + 1.

  • += operator: Compound assignment operator that adds the right-hand operand to the left-hand operand; A plus b is the same thing as a plus b.

  • Operator: dot operator. The left-hand operand must be an object of class type, and the right-hand operand must be the name of a member of this object. The result is this member of the object.

  • :: operator: scope operator. One of its uses is to access names in a namespace. For example, STD ::cout represents the name cout in the namespace STD.

  • = operator: Assigns the value of the right-hand operand to the object represented by the left-hand operand.

  • — operator: Decrement operator. Decrement the operand by 1, — I is equivalent to I = I – 1.

  • << operator: Output operator. Writes the value of the right-hand operand to the output stream represented by the left-hand operand: cout << “hi” writes hi to standard output. The output operators can be concatenated: cout << “hi” << “bye” indicates that hibye will be printed.

  • >> operator (>> operator) : Input operator. Reads data from the input stream specified by the left-hand operand and stores it in the right-hand operand: cin >> I reads the next value from the standard input and stores it in I. The input operator can be concatenated: cin >> I >> j means that one value is read and stored in I, and another value is read and stored in j.

  • Header files include directives that make the code in the header file usable by programs.

  • == operator: Equality operator. Checks whether the left operand is equal to the right operand.

  • ! The = operator (! = operator) : unequal operator. Checks whether the left operand is not equal to the right operand.

  • <= operator: the less than or equal operator. Check whether the left operand is less than or equal to the right operand.

  • < operator: less than operator. Checks whether the left operand is smaller than the right operand.

  • >= operator (>= operator) : greater than or equal to operator. Check whether the left operand is greater than or equal to the right operand.

  • > operator (> operator) : greater than operator. Checks whether the left operand is larger than the right operand.