Featured Posts

I’m still confused. I just can’t understand all this null pointer stuff.

Posted by albert | Posted in PHP, Request | Posted on 16-11-2009

0

A simple rule is, “Always use `0′ or `NULL’ for null pointers, and always cast them when they are used as arguments in function calls.”

VN:F [1.9.3_1094]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)

Why is there so much confusion surrounding null pointers? Why do these questions come up so often?

Posted by albert | Posted in PHP, Request | Posted on 16-11-2009

0

The fact that null pointers are represented both in source code, and internally to most machines, as zero invites unwarranted assumptions.  The use of a  preprocessor macro (NULL) suggests that the value might change later, or on some weird machine.

VN:F [1.9.3_1094]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)

I’m confused. NULL is guaranteed to be 0, but the null pointer is not?

Posted by albert | Posted in PHP, Request | Posted on 16-11-2009

0

A “null pointer” is a language concept whose particular internal value does not matter.  A null pointer is requested in source code with the character “0″.   “NULL” is a preprocessor macro, which is always #defined as 0 (or (void *)0).

VN:F [1.9.3_1094]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)

How do I “get” a null pointer in my programs?

Posted by ma.vinothkumar | Posted in PHP, Request | Posted on 16-11-2009

0

A constant 0 in a pointer context is converted into a null pointer at compile time.  A “pointer context” is an initialization, assignment, or comparison with one side a variable or expression of pointer type, and (in ANSI standard C) a function argument which has a prototype in scope declaring a certain parameter as being of pointer type.  In other contexts (function arguments without prototypes, or in the variable part of variadic function calls) a constant 0 with an appropriate explicit cast is required.

VN:F [1.9.3_1094]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)

Can Any one tell exactly what is Visual C++ ?

Posted by ma.vinothkumar | Posted in Request | Posted on 11-11-2009

1

Can any one please tell me what exactly the Visual C++ is.

VN:F [1.9.3_1094]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)