Quantcast
Channel: Cpp11 – On C++ and other OOPscenities
Viewing all articles
Browse latest Browse all 23

C++11: Initializer lists

$
0
0
If you want to declare and initialize an array of five integers, you could do something like: But in C++03, what would happen if you would want to do the same thing using some STL container, like a std::vector? Something like: You guessed it!!! It would not get compiled. Initializer lists were just available for […]

Viewing all articles
Browse latest Browse all 23

Trending Articles