Home > Enterprise >  C can't use std::array, due to cli::array keyword Visual Studio
C can't use std::array, due to cli::array keyword Visual Studio

Time:12-29

I want to declare a std::array, but the array part gets recognized as cli::array keyword (see the blue array-word recognized as keyword

The blue array-word recognized as keyword

CodePudding user response:

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.

  • Related