Perhaps, I should either thank you for agreeing, or State that I agree with you. Either way: It'll work.
--- On Wed, 9/1/10, Rob Richardson <[email protected]> wrote: From: Rob Richardson <[email protected]> Subject: RE: [c-prog] Re: Can a function return an array of 4 pointers? To: [email protected] Date: Wednesday, September 1, 2010, 10:09 AM That's what I meant by using a marker. RobR -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of benjamin_cail_scott Sent: Wednesday, September 01, 2010 11:06 AM To: [email protected] Subject: [c-prog] Re: Can a function return an array of 4 pointers? You can also have an unbroken array: That is no nulls until you reach the end of the array. You will have to enforce that through programming however. --- In [email protected], "Rob Richardson" <rob.richard...@...> wrote: > > But you need some way to know how big the array is: some marker, like > 0 at the end of a string, or a count of the number of elements in the > array, which would mean you'd return a structure (or class) that looks > something like this: > > struct CountedArray > { > int numberOfElements > MyType* pStartOfElements; > } > > Or you need some guarantee that the function will only return > four-element arrays. > > RobR > ------------------------------------ To unsubscribe, send a blank message to <mailto:[email protected]>.Yahoo! Groups Links [Non-text portions of this message have been removed]
