Monday, September 04, 2006

Conversion operator

A conversion operator can be thought of as a user-defined typecasting operator; it converts its object to a different type in contexts that require that specific type.

operator PASN_Null &();

check the following link:

When do we use pointer instead of reference?

Yes, that's why you preferentially should use references for arguments, and pointers only where null is a possibility you actively support. One common exception is to pass pointers for dynamically allocated objects.

No comments:

Post a Comment