O

An object is a variable of a class type, as distinct from a variable of a native type. The behavior of an object is defined by the code that implements the class to which the object belongs. For example, a variable of type string is an object whose behavior is controlled by the definition of the string class.

Object code; see machine code. This term is unrelated to C++ objects.

An object code module is the result of compiling an implementation file into object code. A number of object code modules are combined to form an executable program. This term is unrelated to C++ objects.

Object file; see object code module. This term is unrelated to C++ objects.

Object-oriented programming, in a broad sense, is an approach to solving programming problems by creating objects to represent the entities being handled by the program, rather than by relying solely on native data types. This has the advantage that you can match the language to the needs of the problem you're trying to solve. For example, if you were writing a nurse's station program in C++, you would have objects that represent nurses, doctors, patients, various sorts of equipment, and so on. Each of these objects would display the behavior appropriate to the thing or person it represents.

In a more specific sense, object-oriented programming is the use of encapsulation, inheritance, and polymorphism to organize programs.

Off-by-one error; see fencepost error.

An ofstream (pronounced “o f stream”) is a stream used for output to a file.

An op code is the part of a machine instruction that tells the CPU what kind of instruction it is and sometimes also specifies a register to be operated on.

An operating system is a program that deals with the actual hardware of your computer. It supplies the lowest level of the software infrastructure needed to run a program. The most common operating system for Intel CPUs, at present, is some form of Windows, followed by Linux.

The keyword operator is used to indicate that the following symbol is the name of a C++ operator we are overloading to handle the particular requirements of a specific class. For example, to define our own version of =, we have to specify operator = as the name of the function we are writing, rather than just =, so that the compiler does not object to seeing an operator when it expects an identifier.

An ostream is a stream used for output. For example, cout is a predefined ostream that displays characters on the screen.

Output is the process of sending data from the computer to the outside world. The most commonly used destination of output for most programs is the screen.

A member function in a derived class is said to override the base class member function if the derived class function has the same signature (name and argument types) as that of the base class member function. The derived class member function will be called instead of the base class member function when the member function is referred to via an object of the derived class. A member function in a derived class with the same name but a different signature from that of a member function in the base class does not override the base class member function. Instead, it “hides” that base class member function, which is no longer accessible as a member function in the derived class.

Overloading a function means to create several functions with the same name and different argument lists. The compiler will pick the function to be executed based on the match between the function call and the available argument lists.

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

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