Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
named argument
homer512
Jun 16th, 2014
566
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
C++
0.16 KB
| None
|
0
0
raw
download
clone
embed
print
report
#define named_arg(a) a, #a
void
foo
(
int
&
arg,
const
char
*
name
)
{
printf
(
"%s = %d
\n
"
, name, arg
)
;
}
int
main
(
)
{
int
x
=
3
;
foo
(
named_arg
(
x
)
)
;
}
Advertisement
Add Comment
Please,
Sign In
to add comment
Public Pastes
Untitled
6 hours ago | 1.88 KB
Untitled
6 hours ago | 0.67 KB
Untitled
6 hours ago | 3.33 KB
Untitled
6 hours ago | 1.00 KB
Untitled
7 hours ago | 0.33 KB
Untitled
7 hours ago | 1.55 KB
my software
10 hours ago | 0.03 KB
disable countdown timer in cart for drop pric...
PHP | 14 hours ago | 0.23 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!