Code from a book:
What does this meanCode:
class LinkableClass
{
public:
LinkableClass* pNext;
//other members
}
LinkableClass* pHead = (LinkableClass*)0;
?Code:(LinkableClass*)0
Printable View
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 LinkableClassQuote:
What does this mean
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.Quote:
telling the compiler to consider 0 an object of the LinkableClass type
Thanks all