Re:Popular Myths about C++, Part 1
by TheCoelacanth on Tuesday December 09, 2014 @11:25AM
(#8723627)
Yes, C++ has no shortage of ways to initialize variables. Any of these should work
TYPENAME v {1, 2, 3};
TYPENAME v = {1, 2, 3};
auto v = TYPENAME {1, 2, 3};
[1]: Before you complain I just created a slice, remember the slice has to point at an array; I've created both a slice and an array so it's not "wrong" to say I've created an array with that syntax.