Cosemuckel
Cosemuckel

Reputation: 407

C++ can't use std::array, due to cli::array keyword Visual Studio

I want to declare a std::array, but the array part gets recognized as cli::array keyword (see Why is "array" marked as a reserved word in Visual-C++?), which means that the std:: doesnt affect it. How can a stop Visual Studio from automatically using namespace cli, or specify that I want to use std::array?

the blue array-word recognized as keyword

The blue array-word recognized as keyword

Upvotes: 1

Views: 564

Answers (1)

akm
akm

Reputation: 363

std::array accepts two template arguments. One is the type of the elements and the other accepts the number of elements.

If you mean to use a dynamic array, then use std::vector.

Upvotes: 5

Related Questions