Possible mistake in example for "Arrays and Vectors" on C++ Track

I checked for a similar topic first but didn’t find one.

Apologies if I’m wrong as I’m very new to C++ myself, but while going through the C++ track I’ve spotted this:

The example of how to declare a vector at Arrays and Vectors in C++ on Exercism says to declare it like “std::vector variable_name<element_type> {list of elements}” - but this doesn’t work for me and doesn’t seem right, should it not be “std::vector<element_type> variable_name {list of elements}” ?

Again I am new to C++ so not sure if I’ve missed something here.

PR with correction.

Making the Grade shows correct syntax, matching yours.

1 Like