Skip to Main Content
Software Essentials
book

Software Essentials

by Adair Dingle
July 2014
Intermediate to advanced content levelIntermediate to advanced
436 pages
12h 27m
English
Chapman and Hall/CRC
Content preview from Software Essentials
384 Appendix D
address, specically the address of the rst element of the array. e loca-
tion of each individual array element is calculated as an oset from the
base address of the array: the jth element has an oset of (j*ElementSize).
In a zero-based array, A[0] is thus the address of the rst element, A[1]
the address of the second element, etc. A[i] is thus associated with the
address of the i+1st element. e compiler automatically deferences the
array address so that the programmer manipulates array elements as data
rather than as addresses.
Example D3: C++ [] Overloaded for Intuitive Access
// intended use: Sequence a(SIZE);
// …
// a[index] = b;
// overloaded operator provide bounds checking
// requires #include cassert
int& ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Software Architect’s Handbook

Software Architect’s Handbook

Joseph Ingeno
Economics-Driven Software Architecture

Economics-Driven Software Architecture

Ivan Mistrik, Rami Bahsoon, Rick Kazman, Yuanyuan Zhang
Software Architect Bootcamp

Software Architect Bootcamp

Raphael Malveau, Ph.D. Thomas J. Mowbray

Publisher Resources

ISBN: 9781439841204