[C++-sig] Returning NULL

Ammar Hakim ahakim777 at yahoo.com
Fri Dec 19 00:51:47 CET 2003


Hello,

How do I wrap a function which can return either an
object or NULL? For example:

SomeObject
foo(int i)
{
   if(i == 0)
     return AnInstance;
   else 
     return NULL;
}

Cheers,
Ammar



__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree




More information about the Cplusplus-sig mailing list