O'Reilly logo

Exploring C++ 11, Second Edition by Ray Lischner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

EXPLORATION 62

image

Old-Fashioned Arrays

Throughout this book, I’ve used std::vector for arrays. Exploration 53 touched on std::array and introduced other containers, such as std::deque. Hidden in the implementation of these types is an old-fashioned, crude, and unsafe style of array. This Exploration takes a look at this relic from C, not because I want you ever to use it, but because you may have to read code that uses this language construct, and it will help you to understand how the standard library can implement vector, array, and similar types. You may be surprised to learn that C-style arrays have much in common with pointers.

C-Style Arrays ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required