A return value of Null is a good return value for failure! However, a Integer indicating how many people records match may be good too.
So in your opinion which option is best for your program??? --- On Sat, 8/14/10, Alex yu <[email protected]> wrote: From: Alex yu <[email protected]> Subject: [c-prog] return type To: "c-prog" <[email protected]> Date: Saturday, August 14, 2010, 7:51 AM provided with a struct: struct Person{ char name[10]; unsigned int id; }; and a function : Person get_person( int) if the check in get_person failed, what should get_person return? for example if(int <0){ return #Oh, what should I return? } [Non-text portions of this message have been removed] [Non-text portions of this message have been removed]
