Notes on "memory and resources" of Stroustrup's "The C++ Programming Language".
Notes on “memory and resources” of Stroustrup’s “The C++ Programming Language”.
Some chapter 34 notes.
array
There’s a fixed size array type designed to replace raw C style arrays. It doesn’t appear that it is bounds checked by default, and the Xcode7 (clang) compiler doesn’t do bounds checking for it right now. Here’s an example
#include <array> using a10 = std::array<int, 10> ; void foo( a10 & a ) { a[3] = 7 ; a[13] = 7 ; } void bar( int * a ) { a[3] = 7 ; a[13] = 7 ; }
View On WordPress













