Code from a book:
What does this meanCode:class LinkableClass { public: LinkableClass* pNext; //other members } LinkableClass* pHead = (LinkableClass*)0;?Code:(LinkableClass*)0
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
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler
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
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
Thanks all