DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR CPP
c++ lambda as variable
int
main
(
)
{
auto
myfunc
=
[
]
(
int
a
,
int
b
)
->
int
{
return
a
+
b
;
}
cout
<<
myfunc
(
12
,
2
)
;
}
PREVIOUS
NEXT
Tagged:
#lambda
#variable
ADD COMMENT
Topic
COMMENT
Name
2+4 =
Submit