简体   繁体   中英

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

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM