views:

43

answers:

1

I have a parameter like this:

rightOperand:(const NSDecimal*)rightOperand

how could I provide a value that represents "nothing" or "empty"? would that be void? i.e.

[myObj rightOperand:void];

or something different? Or is that impossible for structs?

+2  A: 

A null C pointer is simply NULL.

Wevah
Note that while this works for the function he describes (NSDecimal-handling functions), it may cause a crash in other similar functions due to the dereferencing of a NULL pointer.
Brad Larson
Yeah, it really depends on what the documentation says/how the function is written.
Wevah