![]() |
|
#1
|
|||
|
|||
What does =0 in Pure virtual function means?What does =0 in Pure virtual function means? IS there any specific purpose for that?
poolan |
|
#2
|
||||
|
||||
|
It means it is PURE virtual; this is it's only meaning; do you mean to ask what does Pure virtual function mean? If not, your question has been answered
Regards, Luci __________________
Please read these Guidelines before posting on the forum "A person who never made a mistake never tried anything new." Einstein |
|
#3
|
||||
|
||||
|
Using =0 in a function delcaration declares it as a pure virtual function. If you derive a class from a base class that has a pure virtual function in it, then you MUST write that function for the derived class.
__________________
-Aaron |
|
#4
|
||||
|
||||
Re: What does =0 in Pure virtual function means?Why not -1 or some other number?
__________________
Gravitation is not responsible for people falling in love. -Albert Einstein |
|
#5
|
||||
|
||||
Re: What does =0 in Pure virtual function means?Think of function declarations as pointers to the code that executes the body of the function. In fact, this is basically true at the object code level, as each class has a function table that contains pointers to the function code. (Inline expansion is an exception, I suppose.)
Hence, "pure virtual" implies a NULL pointer. Matthew __________________
I was born not knowing and have only had a little time to change that here and there. -- Richard P. Feynman Boris Podolsky: James! How's the rat business? James Moreland: Well, actually it's mostly students I'm experimenting on now. Kurt Gödel: My God, the mazes must be enormous. |
Recent GIDBlog
More photos on Flickr by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Include] Doubly-linked List | dsmith | C Programming Language | 6 | 14-Apr-2006 13:12 |
| Why static member function cannot be virtual in C++ | Poolan | C++ Forum | 1 | 20-Nov-2004 09:51 |
| Nested for loop with function | Tori | C++ Forum | 11 | 08-Nov-2004 13:02 |
| Revising Script style ?????? | pepee | MySQL / PHP Forum | 4 | 14-Apr-2004 04:59 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The