Computer terminology that appears in C + + 1

Source: Internet
Author: User
Tags arithmetic bitset

Access labels (visit label)

A member of a class can be defined as private, which prevents access to that member with code of that type.

Members can also be defined as public, which makes it accessible to members throughout the program.
address (addresses)
A number through which a byte can be found on the memory.

Arithmetic types (arithmetic type)
Represents a value that is the type of an integer and a floating-point number. There are three types of floating-point values: Long double, double, and float, which represent extended precision values, doubles values, and single-precision values, respectively.

Always use double type.

In particular. Float can only guarantee six digits of valid digits. This is not enough for most calculations.

Integral types contain bool, char, wchar_t, short, int, and long. The integral type can be signed or unsigned. Generally, short and char are always avoided in arithmetic calculations.

Unsigned can be used for counting. The bool type only has a value of true and false two. The wchar_t type is used to extend character set characters. The char type is used for 8-bit characters, such as Latin-1 or ASCII.

Array (arrays)
Stores a set of data structures for unnamed objects that can be interviewed by subscript. This chapter describes a character array that stores string literals. The fourth chapter will introduce the array in more detail.
byte (bytes)
The smallest addressable storage unit. Most machines have 8 bits (bit) on a single byte.

Abstract Data Type
Hides the de facto data type. When you use an abstract data type, you only need to understand the operations supported by that type.
A standard library type. It is used to save the location and provide the test and position operation for each bit of the ground.

Cctype Header (cctype header file), which inherits from the C standard library, includes a set of routines that test the character values.

class Template
A blueprint that can create many potential class types.

When you use a class template, you must give the actual type and value. Like what. The vector type is the template that holds the object of the given type. To create a vector object, you must indicate the type of element that this vector object holds. Vector<int> the object that holds the int. The vector<string> saves the string object, and so on.
container (Container)
A type whose object holds a set of objects of a given type.
A signed integral type defined by the vector type. For storing randomly between two iterators.
member functions defined by the string type and the vector type. Empty returns a Boolean value that is used to detect whether a string has characters or if the vector has elements.

It returns true if the size of string or vector is 0, otherwise false.
A function defined in the string header file that takes a IStream object and a String object, reading the input stream until the next newline character. Stores the input stream that is read into the string object and returns the IStream object. NewLine characters are read in and discarded.
High-order (Advanced)
The largest bit of the index value in the Bitset object.

Index (indexed)
The value used by the subscript operator to represent an element obtained from a string object or a vector object. Also called "Subscript".
iterator( iterator)
The type of data used to inspect and traverse the elements of the container type.
iterator arithmetic (arithmetic operation of the iterator)
Arithmetic operations that apply to some (not all) iterator types.

An iterator object can add or subtract an integer value, and the result iterator points to the position of several elements before or after the original iterator. Two iterator objects can be subtracted, resulting in the distance between them.

An iterator arithmetic operation applies only to elements that point to the same container or to the next element iterator that points to the end of the container.

Low-order (Low order)
The bit with the smallest index value in the Bitset object.
Off-the-end iterator (iterator beyond the end)
The iterator returned by the end operation is an iterator that points to the nonexistent element after the end of the container.
Push_ back
member functions defined by the vector type. Used to append elements to the tail of a vector object.
Sentinel (Sentinel)
A programming technique that uses a value to control the processing process.

Use the iterator returned by the end operation as the protector in this chapter, and use it to stop processing the elements in the vector when all the elements in the vector object have been processed.
A function defined by the library type string, vector, and bitset, respectively, to return the number of characters, elements, and bits of this three type. The size member function of the string and vector classes returns a value of type size_type (for example, the size operation of a String object returns the String::size_type type value).

The size operation of the Bitset object returns the size_t type value.
A machine-related unsigned integer defined in the Cstddef header file, which is sufficient to hold the maximum array length.

The machine-related unsigned integer defined in the Cstddef header file, which is sufficient to hold the largest array of
A type defined by the string class type and the vector class type to hold the length of a random string object or Vecotr object.

The standard library type defines size_type as the unsigned type.

using declarations (using declaration)
Enables the name of a namespace to be referenced directly. Example:
Using Namespace::name;

The ability to access the name directly without prefix namespace::.

Value initialization (initialization of values)
Initializes the container element when the length of the given container but does not explicitly provide an initial type of element.

The element is initialized to a copy of the value produced by the compiler.

Assuming the container holds the built-in type variable, the initial value of the element is set to 0.

Assuming that the container is used to hold the class object, the initial value of the element is generated by the class's default constructor.

The container element of a class type has the ability to initialize values when only the class provides a default constructor.
+ + operator (+ + operator)
The auto-increment operator for the iterator type definition. Moves the iterator through the "plus 1" pointer to the next element.
:: operator (:: operator)
The scope operator. :: The operator finds the name of its right operand within the scope of its left operand. Used to access a name in a namespace. such as Std::cout. Indicates that the name cout from the namespace Std. Similarly, you can use a name from a class, such as String::size_type, to indicate that size_type is defined by the string class.
[] Operator ([] operator)
The overloaded operator defined by the string, vector, and bitset types. It accepts two operands: the left operand is the object name, and the right operand is an index. This operator is used to remove the elements that match the position to the index. The index count starts at 0, that is, the first element has an index of 0, and the last element has an index of obj.size ()-1.

The subscript operation returns an lvalue, so the subscript operation can be used as the left operand of the assignment operation.

Assigning a value to the result of the subscript operation is to assign a new value to the corresponding meta-

* operator (* operator)
The iterator type definition understands the reference operator to return the object that the iterator points to. The dereference returns the left value. The dereference operator can therefore be used as the left operand of an assignment operation.

Assigning a value to the result of a dereference operation is to assign a new value to the corresponding element.
<< operator (<< operator)
The standard library type string and Bitset define the output operator.

The output operator of type string outputs the characters in the string object. The output operator of the Bitset type outputs the bit pattern of the Bitset object.
>> operator (>> operator)

The standard library type string and Bitset define the input operators.

The input operator of type string reads a string that is delimited by a white-space character. and stores the read-in content in the right-hand operand (string object). The input operator of the Bitset type reads into a bit sequence into its bitset operand.

c-stylestrings (C-style string)
The C program treats a pointer to an array of characters ending with a null character as a string. In C + +. String literals are C-style strings. The C standard library defines a series of library functions that deal with such strings. These standard library functions are placed in the CString header file in C + +. Because C-style strings are inherently easy to make mistakes, C + + programs should take precedence over C + + standard library class string and use less of a style string. A large number of security vulnerabilities in network programs are due to defects related to the use of C-style strings and arrays.

compiler extension (compiler Extension)
A specific compiler is a language-joined feature. Programs that rely on compiler extensions are very difficult to port to other compilers.
Compound type(composite type)
Use a type defined by another type. arrays, pointers, and references are composite types.
Const void*
Pointer type that can point to a random const type, see void *.
Delete expression (delete expressions)
The delete expression is used to free memory allocated dynamically by new:
delete [] p;
In this expression, p must be a pointer to the first element in a dynamically created array. When the brackets are indispensable: it tells the compiler that the pointer is pointing to the array. Rather than a single object.

C + + programs use Delete instead of the standard library function of the C language free.
Dimension (number of dimensions)
The array size.

dynamically allocated (dynamically assigned)
The object that is established in the free store of the program.

Once created, the object persists until it is explicitly released.
Free Store
The memory area that the program uses to store dynamically created objects.
Heap (heaps)
A synonym for a free storage area.

new expression (new expressions)
An expression that is used to allocate dynamic memory. The following statement assigns an array of n elements:
New Type[n];
The array holds elements of type types.

New returns a pointer to the first element of the array. C + + programs use new instead of the C language standard library function malloc.

pointer (pointer)
The object that holds the address of the object.
pointer arithmetic (pointer arithmetic operation)
Arithmetic operations that can be used for pointers. Agrees to do the addition or subtraction of integer values on the pointer. To get the address at a number of elements before or after the current pointer. Two pointers can be subtracted to get the difference between them. Only when the pointer points to the same array or to its position beyond the end. The arithmetic operation of pointers is meaningful.
Precedence (priority level)
In complex expressions, the precedence determines the order in which the operands are grouped.
A machine-related signed integer defined in the Cstddef header file that has enough size to store the difference of two pointers that point to the same possible maximum array.
The machine-related unsigned integer defined in the Cstddef header file, which has enough size to store a possible maximum array.
* operator (* operator)
Dereference the pointer to the object that the pointer points to. The dereference operator returns an lvalue, so it can be assigned a value that is equivalent to assigning a new value to the specific object that the pointer points to.

++operator (+ + operator)
When used for pointers, the increment operator gives the pointer "plus 1", moving the pointer to the next element of the array.

[] Operator ([] operator)
The subscript operator accepts two operands: one is a pointer to an array element, and one is subscript N. This action returns the value of an element that deviates from the current pointer to n positions. The array subscript starts at 0--the subscript of the first element of the array is 0. The subscript of the last element is the array length minus 1. The subscript operation returns an Lvalue, which can be used as the left operand of an assignment operation, equivalent to assigning a new value to the element referenced by the subscript.
& Operator (& operator)
The fetch address operator requires an operand whose only operand must be an Lvalue object, which returns the storage address of the operand object in memory.
Pointer type that can point to whatever non-const object. The void* pointer provides only a limited number of operations: it can be used as a function type or return type, or as a comparison to other pointers. However, the dereference operation cannot be performed.

Computer terminology that appears in C + + 1

Related Article

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: 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.