Cannot create a std::vector of const std::string!
Hi,
I cannot create the following vector:
|
std::vector<const std::string> constvec;
| |
I get these errors:
error C2440: 'initializing': cannot convert from 'const std::basic_string<char,std::char_traits<char>,std::allocator<char>> *' to 'std::basic_string<char,std::char_traits<char>,std::allocator<char>> *&'
|
Is it impossible to create vectors of const elements?
Regards,
Juan Dent
Topic archived. No new replies allowed.