C++ Neural Networks and Fuzzy Logic: Preface


Polymorphism and Polymorphic Functions



Download 1,14 Mb.
Pdf ko'rish
bet43/443
Sana29.12.2021
Hajmi1,14 Mb.
#77367
1   ...   39   40   41   42   43   44   45   46   ...   443
Bog'liq
C neural networks and fuzzy logic

Polymorphism and Polymorphic Functions

A polymorphic function is a function whose name is used in different ways in a program. It can be also

C++ Neural Networks and Fuzzy Logic:Preface

Constructors and Destructors as Special Functions of C++

32



declared virtual, if the intention is late binding. This enables it to be bound at run time. Late binding is also

referred to as dynamic binding. An advantage in declaring a function in an object as virtual is that, if the

program that uses this object calls that function only conditionally, there is no need to bind the function early,

during the compilation of the program. It will be bound only if the condition is met and the call of the function

takes place. For example, you could have a polymorphic function called draw() that is associated with

different graphical objects, like for rectangle, circle, and sphere. The details or methods of the functions are

different, but the name draw() is common. If you now have a collection of these objects and pick up an

arbitrary object without knowing exactly what it is (via a pointer, for example), you can still invoke the draw

function for the object and be assured that the right draw function will be bound to the object and called.


Download 1,14 Mb.

Do'stlaringiz bilan baham:
1   ...   39   40   41   42   43   44   45   46   ...   443




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish