Yeah it was introduced I think in C++17. It's called constructor initialization (named after how variables are initialized in class constructors). Another way is uniform initialization: int a {10};. Both of these ways can be combined with the old way: int a = (10) and int a = {10}.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Yeah it was introduced I think in C++17. It's called constructor initialization (named after how variables are initialized in class constructors). Another way is uniform initialization:
int a {10};
. Both of these ways can be combined with the old way:int a = (10)
andint a = {10}
.