C++ Neural Networks and Fuzzy Logic: Preface


Dynamic Memory Allocation



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

Dynamic Memory Allocation

C++ has keywords new and delete, which are used as a pair in that order, though separated by other statements

of the program. They are for making dynamic allocation of memory at the time of creation of a class object

and for freeing−up such allocated memory when it is no longer needed. You create space on the heap with the

use of new. This obviates the need in C++ for malloc, which is the function for dynamic memory allocation

used in C.



Overloading

Encapsulation of data and functions would also allow you to use the same function name in two different

objects. The use of a name for a function more than once does not have to be only in different object

declarations. Within the same object one can use the same name for functions with different functionality, if

they can be distinguished in terms of either their return type or in terms of their argument types and number.

This feature is called overloading. For example, if two different types of variables are data items in an object,

a commonly named function can be the addition, one for each of the two types of variables—thus taking

advantage of overloading. Then the function addition is said to be overloaded. But remember that the function

main is just about the only function that cannot be overloaded.


Download 1,14 Mb.

Do'stlaringiz bilan baham:
1   ...   38   39   40   41   42   43   44   45   ...   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