no, it's int apple = 5; basically or int apple(5); which is the same
then what is advantage of using curly braces ?
Ah, sorry, I've linked a wrong page above, I meant to link this https://subscription.packtpub.com/book/application_development/9781786465184/1/ch01lvl1sec7/understanding-uniform-initialization
I understood . Thanks buddy
Here's a more advanced talk about different ways of initialization in different C++ versions from old to new, talking about this also and other "modern" ways like auto apple = int{ 5 } https://www.youtube.com/watch?v=7DTlWPgX6zs
Thank you for this
Обсуждают сегодня