Do you want to get a C++ question every day to get prepared for your next interview? Sign up for DailyCppInterview for free!
Reading through Scott...
For further actions, you may consider blocking this person and/or reporting abuse
comment in the following example is wrong
i guess it compiles
You are right, I forgot to remove the comment there. Thanks a lot for spotting it!
Hey Sandor,
I had also written an article on Lambda expression covering basic to somewhat advance with simple & small illustrative examples here
Beginners will see "How Lambda expression synthesize by the compiler?" and for experienced programmers, you will see "There is a Lambda function returning another Lambda function"
I have also developed a Lambda mind map which is bonus material here.
Suggestion & Comments are most welcome.
Great read! Any direction on resources for learning C or C++? This got me interested.
That depends, I took a course that used this as course material. It is extensive, but it's no pleasant read.
If you know the syntax, but want to know best practices I can highly recommend the CPPCoreGuidelines by Bjarne (creator of the language) and Herb.
That's a very good question which is difficult to answer.
Cppreference.com is not bad. I'd say take some tutorial and stick to it. That's not how I learnt so I cannot really recommend any but here is one.
Once you learnt the syntax and the basics, read some more advanced books, like Effective Modern C++ and follow some blogs, like Fluentcpp to learn about deeper topics.
While maybe not the best site to learn C++, cppreference.com is a great place to consult when you need to know how to use a particular piece of standard functionality.
With using
[&, divisor]
as a capture, everything will becaptured by value
except for the variable that is explicitly listed.Should that be captured by reference ??
excellent read! thanks
Thanks for your kind words!