|
-
November 25th, 2003, 08:36 PM
#1
Member
C++,dynamic byinding help needed
what is dynamic bynding, how is dynamic bynding used to inplement run time polymorphism?
-
November 25th, 2003, 08:44 PM
#2
-
November 25th, 2003, 09:00 PM
#3
Senior Member
i dont think the Q is related to Network security but any way here goes
Dynamic Binding:- Binding refers to the linking of a procedure call to be executed in response to the call. Dynamic binding means that the code associated with a given procedure call is not known until the time of the call at run-time. It is also called late binding because the connection between the function call & the actual code executed by the call is determined late – during the execution of the program and not when the program is compiled. Dynamic binding is implemented using virtual functions and points.
A function qualifies as a virtual function by the keyword virtual written in from of it. When a virtual function is called via a pointer, the class of the object pointed to determine which function definition will be used. Virtual functions implement polymorphism, whereby objects belonging to different classes can respond to the same message in different ways. A pure virtual function is a function that indicates that the virtual function of an abstract base class is not implemented.
Polymorphism means the ability to take different forms. For example an operation may exhibit different behaviors in different instances. for instance consider an operation of addition. For two numbers, the operation will generate a sum. If the operands are strings, then, the operation would be producing a third string by concatenating the two strings.
Dynamic binding implements run-time polymorphism using virtual functions and pointers. The functionality of a virtual function is determined by the class that inherits the base class containing the virtual function. For example, consider a bookshop that sells both books and tapes. We create a class that stores the title and price of a publication. This class contains a virtual function named display() that displays the details of that publication.
We not create two derived class namely, Book and Tape that inherit this class. Now each of the above said classes would have this procedure but its algorithm or the functionality would be unique for all the three classes & so the display procedure will be redefined in each class that defines that object. At runtime, the code matching the object under current reference will be called. A figurative description of the whole scenario is given below:
_____________
| Media |
---------------------
| Display() |
-------------------
|
|
-----------------------------------------
| |
| |
____________________ _____________
| Book | | Media |
-------------------------- --------------------
| Display(book_detail) | | Display() |
-------------------------- -------------------
Run time Polymorphism
Runtime – Polymorphism
-
November 25th, 2003, 09:12 PM
#4
Senior Member
The diagram came a littel jumbled so i am posting a pic
-
November 25th, 2003, 09:16 PM
#5
Senior Member
the diagram in my above post came a littel jumbled so i am sending u a img
-
November 26th, 2003, 02:42 AM
#6
YOUR AVATAR
WOLVERINE YOUR AVATAR IS EXTREMELY OFFENSIVE TO ME!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
PLEASE REMOVE IT AT ONCE!!!!!!!!!!

The more i think about it the more disturbing I find you SWASTIKA pisses me off. Remember you are in a "Community", with people of many backgrounds. The symbol you are displaying is one of a terrible time in the history of our world.
-
November 26th, 2003, 06:14 AM
#7
it meant good luck and still does hence why hitler choose it but anyway
you people live in your country of "Free speach" so ****ing deal with it he has as much right as you do of looking like a ****ing reject from a bad 80's punk band
-
November 26th, 2003, 06:17 AM
#8
Unfortunate
Very unfortunate than an ancient sbybol was used as a symbol of power by a few bad people, to ruin a nations reputation.
Thanks for your words Gore.
If I am not mistaken the original symbol was reversed to the "Modern", day Swastika, which truly meant the opposite.
I look forward to this Avatar being changed. I hope it is a misunderstanding.
-
November 26th, 2003, 06:23 AM
#9
!!!!!!!!!!!!!!!
Originally posted here by RiOtEr
it meant good luck and still does hence why hitler choose it but anyway
you people live in your country of "Free speach" so ****ing deal with it he has as much right as you do of looking like a ****ing reject from a bad 80's punk band
And an insult as a response. Very proud of you.
Do you know me?...................... So how do you know what I look like.
www.irisatlanta.com
I left the scene to become fat faced Chef LOL.
-
November 26th, 2003, 06:25 AM
#10
Uh gore!!!!!!
The Exploited...among many others. So bad they were good
LOL Gore
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|