top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

C++: Is there any way to use default arguments with a lambda function ?

+1 vote
1,130 views
C++: Is there any way to use default arguments with a lambda function ?
posted Sep 18, 2020 by Crazy

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

0 votes

I think it is very simple and the syntax would be as below.

[](int x, int y = 7) { }

Here "y" is a default argument.

answer Jan 30, 2021 by Vimal Kumar Mishra
0 votes

Blockquote

answer Feb 14, 2021 by Ajit Yadav
Similar Questions
+1 vote

Does there exist any way to make the command line arguments available to other functions without passing them as arguments to the function in C programming?

+2 votes

I want to pass a string over the network, After Coding and Decoding How will i make sure that this is the same string ?

...