V

A value argument is a variable of local scope created when a function begins execution. Its initial value is set to the value of the corresponding argument in the calling function. Changing a value argument does not affect any variable in the calling function. Compare with reference argument.

A variable is a programming construct that uses a certain part of RAM to represent a specific item of data we wish to keep track of in a program. Some examples are the weight of a pumpkin or the number of cartons of milk in the inventory of a store.

A vector is a group of variables, each of which can be addressed by its position in the group; each of these variables is called an element. A vector has a name, just as a regular variable does, but the elements do not. Instead, each element has an index that represents its position in the vector.

A Vec is exactly like a vector except that it checks the validity of the index of an element before allowing access to that element.

Declaring a function to be virtual means that it is a member of a set of functions having the same signatures and belonging to classes related by inheritance. The actual function to be executed as the result of a given function call is selected from this set of functions dynamically (i.e., at run time) based on the actual type of an object referred to via a base class pointer (or base class reference). This is the C++ dynamic typing mechanism used to implement polymorphism, in contrast to the static typing used for non-virtual functions, where the exact function to be called can be determined at compile time.

A void return type specifier in a function declaration indicates that the function in question does not return any value when it finishes executing.

The term vtable is an abbreviation for virtual function address table. It is where the addresses of all of the virtual functions for a given class are stored; every object of that class contains the address of the vtable for that class.[5]

[5] Note that the compiler is not required by the standard to use a vtable to implement virtual functions. However, that is the typical way of implementing such functions.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset