|
-
February 1st, 2005, 11:27 PM
#1
Multiple output arguments
The C++ alows returning more than one value from a function through pointers and references.
It would have been nice if we could declare multiple output arguments on the left,
for example : -
int, int GetXY()
{
int x, y;
--------------;
return x, y;
}
and call this as
int x, y;
----------;
x, y = GetXY();
or
(x, y) = GetXY();
Note how much this syntax looks natural to the C++ language.
What do you think?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|