Code from a book:
What does this meanCode:class LinkableClass { public: LinkableClass* pNext; //other members } LinkableClass* pHead = (LinkableClass*)0;?Code:(LinkableClass*)0
This is a discussion on Linked List within the C++ Programming forums, part of the General Programming Boards category; Code from a book: Code: class LinkableClass { public: LinkableClass* pNext; //other members } LinkableClass* pHead = (LinkableClass*)0; What does ...
Code from a book:
What does this meanCode:class LinkableClass { public: LinkableClass* pNext; //other members } LinkableClass* pHead = (LinkableClass*)0;?Code:(LinkableClass*)0
cast null-pointer to the type Pointer to Class LinkableClassWhat does this mean
If I have eight hours for cutting wood, I spend six sharpening my axe.
Its a cast, albeit unnecessary. It just defining pHead as 0 and telling the compiler to consider 0 an object of the LinkableClass type.
The cast is unnecessary though.
EDIT:
Not really. More like it means that pHead is a null pointer.telling the compiler to consider 0 an object of the LinkableClass type
C + C++ Compiler: MinGW port of GCC
Version Control System: Bazaar
Look up a C++ Reference and learn How To Ask Questions The Smart Way
Thanks all