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
336 Appendix A
A.2 INAPPROPRIATE USE OF POINTERS
Example A3 illustrates illegal and unwise manipulations of pointers.
Figure A3 sketches the corresponding memory allocation. A pointer may
not hold the address of a constant value. Nor may a pointer point to a literal
value. Why? ere is no program memory associated with constants or lit-
erals. e cross-through statements in Example A3 indicate compilation
errors. More problematic are statements that compile but have unknown
eect because the pointer variable may or may not contain a valid address.
Example A3: Danger of the Uninitialized: C++
// C++ code: missing and illegal initialization ...
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