C++ 名詞解釋-英文

An identifier is a name which is used to refer to a variable, constant, function or type in C++. When necessary, an identifier may have an internal structure which consists of a prefix, a name, and a suffix (in that order).

A class is a user-defined data type which consists of data elements and functions which operate on that data. In C++, this may be declared as a class; it may also be declared as a struct or a union. Data defined in a class is called member data and functions defined in a class are called member functions.

A class/struct/union is said to be an abstract data type if it does not have any public or protected member data.

A structure is a user-defined type for which only public data is specified.
Public members of a clas s are member data and member functions which are everywhere accessible by specifying an instance of the class and the name.
Protected members of a class are member data and member functions which are accessible by specifying the name within member functions of derived classes..

A class template defines a family of classes. A new class may be created from a class template by providing values for a number of arguments.These values may be names of types or constant expressions.

A function template defines a family of functions. A new function may be created from a function template by providing values for a number of arguments. These values may be names of types or constant expressions.

An enumeration type is an explicitly declared set of symbolic integralconstants. In C++ it is declared as an enum.

A typedef is another name for a data type, specified in C++ using a typedef declaration.

A reference is another name for a given variable. In C++, the 'address of ' (&) operator is used immediately after the data type to indicate that the declared variable, constant, or function argument is a reference.

A macro is a name for a text string which is defined in a #define statement. When this name appears in source code, thecompiler replaces it with the defined text sag.

A constructor is a function which initializes an object.

A copy constructor is a constructor in which the first argument is a reference to an object that has the same type as the object to be initialized.

A default constructor is a constructor which needs no arguments.

An overloaded function name is a name which is used for two or more functions or member functions having different types.

An overridden member function is a member function in a base class which is redefined in a derived class. Such a member function is declared virtual.

A pre-defined data type is a type which is defined in the language itself, such as int.

A user-defined data type is a type which is defined by a programmer in a class, struct, union, enum, or typedef definition or as an instantiation of a class template.

A pure virtual function is a member function for which no definition is provided. Pure virtual functions are specified in abstract base classes and must be defined (overridden) in derived classes.

An accessor is a function which returns the value of a data member.

A forwarding function is a function which does nothing more than call another function.

A constant member function is a function which may not modify data members.

An exception is a run-time program anomaly that is detected in a function or member function. Exception handling provides for the uniform management of exceptions. When an exception is detected, it is thrown (using a throw expression) to the exception handler.

A catch clause is code that is executed when an exception of a given type is raised. The definition of an exception handler begins with the keyword cat ch.

An abstract base class is a class from which no objects may be created; it is only used as a base class for the derivation of other classes. A class is abstract if it includes at least one
member n that is declared as pure virtual.

An iterator is an object which, when invoked, returns the next object from a collection of objects.
The scope of a name refers to the context in which it is visible.

A compilation unit is the source code (after preprocessing) that is submitted to a compiler for compilation (including syntax checking).

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章