Uniform Initialization in C++: The Power of Braces
When writing C++, do you often find yourself struggling with whether to use <span>=</span> or <span>()</span> to initialize variables? Sometimes you write it as <span>int a = 10;</span> Other times you write it as <span>std::string s("hi");</span> Can class member variables only be initialized through constructors? 🤯 To address the above issues, C++11 introduced a powerful … Read more