C++
PROGRAMMING FEATURES:
1. The C++
programming language is based on the C language.
2. Although
C++ is a descendant of the C language, the two languages are not always
compatible.
3. In C++,
you can develop new data types that contain functional descriptions (member
functions) as well as data representations. These new data types are called
classes.
4. The work
of developing such classes is known as data abstraction. You can work with a
combination of classes from established class libraries, develop your own
classes, or derive new classes from existing classes by adding data
descriptions and functions.
5. New
classes can contain (inherit) properties from one or more classes. The classes
describe the data types and functions available, but they can hide
(encapsulate) the implementation details from the client programs.
6. You can
define a series of functions with different argument types that all use the
same function name. This is called function overloading. A function can have the
same name and argument types in base and derived classes.
7. Declaring
a class member function in a base class allows you to override its
implementation in a derived class. If you use virtual functions,
class-dependent behavior may be determined at run time. This ability to select
functions at run time, depending on data types, is called polymorphism.
8. You can
redefine the meaning of the basic language operators so that they can perform
operations on user-defined classes (new data types), in addition to operations
on system-defined data types, such as int, char, and float. Adding properties
to operators for new data types is called operator overloading.
9. The C++
language provides templates and several keywords not found in the C language.
Other features include try-catch-throw exception handling, stricter type
checking and more versatile access to data and functions compared to the C
language.
Related Topics
Privacy Policy, Terms and Conditions, DMCA Policy and Compliant
Copyright © 2018-2024 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.