Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C Programming
Returning values from a function
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Dan Pop, post: 1683340"] I do: one is a clean design, the other is a quick and dirty hack. Who said it's safer? I was NOT talking about *debugging* code, I was talking about reading or maintaining code. If the code is known not to behave as intended, nothing can be assumed to be correct. And I was, obviously, not talking about trivial cases, as the ones shown by you. Checking the definition is necessary only if you want to know what exactly gets stored in the array. But it is a safe bet that the original contents will not survive the call. Then, feel free to use the many pointers solution, any time you need to return multiple values from a function. Hopefully, I won't have to maintain your code. Dan [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
Returning values from a function
Top