<< C ++ Primer >> Chapter strings, vectors and arrays Glossary

Glossary

Chapter 3 strings, vectors and arrays

begin: a member of the string and vector, and returns a pointer to the first element of the iterator. Is a standard library function, enter a number, it returns a pointer to the first element of the digital pointer.
  
Buffer overflow (buffer overflow): a serious procedural failures, the main reason is trying to index the contents of a cross-border access to the container, the container types include string, vector and arrays.
  
C-style strings (C-style string): null terminated character array. C-style string literal strings, C-style string error prone.
  
Class template (class template): used to create specific types of templates. To use a class template, you must provide information about the type of assistance. For example, to define a vector object specifies the type of element: vector It contains elements of type int.
  
Compiler extensions (compiler extension): a particular language C ++ compiler for additional features. Based on the program compiler extensions written in easily portable to other compilers.
  
Container (container): is a type which houses a set of target objects of a given type. vector is a container type.
  
Copy initialization (copy initialization): using an assignment (=) forms of initialization. The newly created object is a copy of the initial value.
  
difference_type: A tape defined by stirng symbol vector and integer type, the distance between two iterators values.
  
Initialized directly (direct initialization): do not use an assignment (=) forms of initialization.
  
empty: a member of the string and vector, and returns a Boolean value. When the size of the object is true returns 0, otherwise it returns false.
  
end: a member of the string and vector, returning after a tail iterator. Is a standard library function, an array of input, it returns a pointer to the next location of the last element of the array of pointers.
  
getline: a function defined in the header file string, to a subject an istream and a stirng input parameters. Part with function first read the contents of the input stream until it encounters a newline stop, and then read data into string objects, and returns an istream. Which newline read but not preserved.
  
Index (index): Is the value used in the subscript operator. It represents a position to be accessed in string objects, vector objects or array.
  
Examples of (instantiation): Compiler template generation process of a class or function specified.
  
Iterator (iterator): is a type of access to the container for the elements or between the elements move.
  
Iterator operation (iterator arithmetic): iterators string or vector arithmetic of: iterator integer addition or subtraction to obtain a new iterator, compared to the principles of the iteration, a new forward or backward iterator moving a plurality of positions. Two iterators obtained by subtracting the distance between them, in which case they have to point to the next position of the same elements of a container or container end of the element.
  
Null terminated string (null-terminated string): is a string, the last character following it is also followed by a null character ( '\ 0').
  
After the end of the iterator (OFF-The-End Iterator): End function returns the iterator does not exist an element, which is located at the end of a position of the container element.
  
Pointer arithmetic (pointer arithmetic): a pointer type to support arithmetic operations. Like pointer to an array type operations supported by the iterator operation.
  
prtdiff_t: a header file cstddef machine implementation defined related signed integer type, it is large enough, the array can be represented by the distance between any two pointers.
  
push_back: a member of the vector, and add elements to the end of the vector object.
  
For statement range (range for): A control statement may iterate within a specific set of values.
  
size: a member of the string and vector, and return the number of elements or characters. Type of the return value is size_type.
  
size_t: a header file cstddef machine implementation defined about unsigned integer type, it is large enough, it can represent any size array.
  
string: a library types, it represents a sequence of characters.
  
using statement (using declaration): make a name in the namespace Sadly program directly.
      using namespace :: name
above statement of the role is to make the program can directly use the name , without having to write its prefix portion of the namespace ::
  
initializes the value (value initialization): an initialization process. Built-in type is initialized to 0, the default class types are initialized by class constructor. Only when the class contains a default constructor, object of this class will be initialized value. For the initialization container, if the container is only described without specifying the size of the initial value, the value will execute initialization. At this time, the compiler generates a value, and the element of the container is initialized to this value.
  
vector: is a standard type of library, receiving a set of elements of a specified type.
  
++ operator (++ operator): It is defined iterators and pointer increment operator. Perform "add 1" operation causes the iterator to the next element.
  
[] Operator ([] operator): subscript operator next. obj [j] to obtain the position of the element in the j obj container object. Index starts at 0, the index of the first element is 0, the end of the index element is obj.size () - 1. The return value is the subscript operator next object. If p is a pointer, n being an integer, then p [n-] with (p + n) is equivalent.
  
-> operator (-> operator): the arrow operator, the operator operation and comprehensive understanding reference point operation. a -> b is equivalent to (
.B A).
  
<< operator (<< operator): library types defined in the output string operator responsible for outputting the character string object.
  
>> operator (>> operator): library types string defined input operator is responsible for reading a set of characters, encounters a blank stop to read the contents of the operands assigned to the right of the operator, the operand should It is a string object.
  
! Operator (operator!): Logical NOT operator, the Boolean operands its negated. If the operand is false, the result is true if the operand is true, the result is false.
  
&& operator (&& operator): Logical AND operator, if both operands are true, the result is true. Examination will true only when the right side of the left operand operands.
  
|| operator (|| operator): Logical OR operator, either operand is true, the result will be true. Only the right of inspection is false only when the left operand operands. Chapter 3 strings, vectors and arrays

Guess you like

Origin www.cnblogs.com/isChenJY/p/11407851.html