C++ Initializers, Initializer Lists, and Initialization

preview_player
Показать описание
Let's start a new series covering some cool stuff from C++11 you may have missed or forgotten about. Here's all the ways you can initialize stuff. In this programming tutorial for beginners, you'll learn new ways to initialize variables, arrays, vectors, and all kinds of stuff. I'll show you how to do this writing sample programs using Visual Studio Community

2:09 ⇒ Coding begins

// Learn More //
Check out my complete C++ videos playlist:

// Consider supporting this channel in multiple ways //
Bitcoin: 177wfkQwzXiC8o2whQMVpSyuWUs95krKYB
Рекомендации по теме
Комментарии
Автор

but! there is an infamous gotcha with vector: the initializer lists make vector<int> v(2, 0) not the same as vector<int> v{2, 0}, whereas () and {} are pretty much the same for all other types

xealit