error C2039:string_view

Pages: 12
I'm not sure that VS2010 supports the {} for variable initialisation. It's a very old compiler. Try:

L9
 
size_t i = 0;


Same for L18.
Using {} for variable initialization is known as "Uniform Initialization" and was added in C++11. https://mbevin.wordpress.com/2012/11/16/uniform-initialization/

VS2010 doesn't support C++11, that was added to VS2012 and later.

Without C++11 support there are a lot of key C++ features simply unavailable. That is why getting a newer C++ compiler is so critical.

Using Boost will help plug the gaps, though it isn't an ideal solution.
If you're a beginner, why are you copying relatively complicated code that you didn't write?
If you're a beginner, why are you copying relatively complicated code that you didn't write?

Maybe because the op is a beginner, and doesn't have the skill/experience to produce it?
Topic archived. No new replies allowed.
Pages: 12