(eBook PDF) C++ How to Program 10th Edition by Paul J. Deitel download
(eBook PDF) C++ How to Program 10th Edition by Paul J. Deitel download
https://ebooksecure.com/product/ebook-pdf-c-how-to-program-10th-
edition-by-paul-j-deitel/
http://ebooksecure.com/product/ebook-pdf-visual-c-how-to-
program-6th-edition-by-paul-j-deitel/
https://ebooksecure.com/download/c-how-to-program-ebook-pdf/
http://ebooksecure.com/product/ebook-pdf-c-how-to-program-global-
edition-8th-by-paul-deitel/
https://ebooksecure.com/download/c-how-to-program-9th-global-
edition-ebook-pdf/
(eBook PDF) Java How to Program, Early Objects 11th
Edition by Paul J. Deitel
http://ebooksecure.com/product/ebook-pdf-java-how-to-program-
early-objects-11th-edition-by-paul-j-deitel/
https://ebooksecure.com/download/c-how-to-program-an-objects-
natural-approach-11e-ebook-pdf/
https://ebooksecure.com/download/c-how-to-program-with-case-
studies-in-applications-and-systems-programming-global-edition-
ebook-pdf/
http://ebooksecure.com/product/ebook-pdf-java-how-to-program-
early-objects-10th/
http://ebooksecure.com/product/c-how-to-program-early-objects-
version-9th-edition-ebook-pdf/
Trademarks
DEITEL and the double-thumbs-up bug are registered trademarks of Deitel and Associates, Inc.
Carnegie Mellon Software Engineering Institute™ is a trademark of Carnegie Mellon University.
CERT® is registered in the U.S. Patent and Trademark Office by Carnegie Mellon University.
UNIX is a registered trademark of The Open Group.
Microsoft and/or its respective suppliers make no representations about the suitability of the information
contained in the documents and related graphics published as part of the services for any purpose. All
such documents and related graphics are provided “as is” without warranty of any kind. Microsoft and/
or its respective suppliers hereby disclaim all warranties and conditions with regard to this information,
including all warranties and conditions of merchantability, whether express, implied or statutory, fitness
for a particular purpose, title and non-infringement. In no event shall Microsoft and/or its respective sup-
pliers be liable for any special, indirect or consequential damages or any damages whatsoever resulting
from loss of use, data or profits, whether in an action of contract, negligence or other tortious action,
arising out of or in connection with the use or performance of information available from the services.
The documents and related graphics contained herein could include technical inaccuracies or typograph-
ical errors. Changes are periodically added to the information herein. Microsoft and/or its respective sup-
pliers may make improvements and/or changes in the product(s) and/or the program(s) described herein
at any time. Partial screen shots may be viewed in full within the software version specified.
Microsoft® and Windows® are registered trademarks of the Microsoft Corporation in the U.S.A. and
other countries. Screen shots and icons reprinted with permission from the Microsoft Corporation. This
book is not sponsored or endorsed by or affiliated with the Microsoft Corporation.
Throughout this book, trademarks are used. Rather than put a trademark symbol in every occurrence of
a trademarked name, we state that we are using the names in an editorial fashion only and to the benefit
of the trademark owner, with no intention of infringement of the trademark.
Contents
Chapters 23–26 and Appendices F–J are PDF documents posted online at the book’s
Companion Website, which is accessible from
http://www.pearsonhighered.com/deitel
Preface xxiii
8 Pointers 339
8.1 Introduction 340
8.2 Pointer Variable Declarations and Initialization 341
8.2.1 Declaring Pointers 341
8.2.2 Initializing Pointers 342
8.2.3 Null Pointers Prior to C++11 342
xii Contents
9.2.7 Time Class Member Function setTime and Throwing Exceptions 392
9.2.8 Time Class Member Function toUniversalString and
String Stream Processing 392
9.2.9 Time Class Member Function toStandardString 393
9.2.10 Implicitly Inlining Member Functions 393
9.2.11 Member Functions vs. Global Functions 393
9.2.12 Using Class Time 394
9.2.13 Object Size 396
9.3 Compilation and Linking Process 396
9.4 Class Scope and Accessing Class Members 398
9.5 Access Functions and Utility Functions 399
9.6 Time Class Case Study: Constructors with Default Arguments 399
9.6.1 Constructors with Default Arguments 399
9.6.2 Overloaded Constructors and C++11 Delegating Constructors 404
9.7 Destructors 405
9.8 When Constructors and Destructors Are Called 405
9.8.1 Constructors and Destructors for Objects in Global Scope 406
9.8.2 Constructors and Destructors for Non-static Local Objects 406
9.8.3 Constructors and Destructors for static Local Objects 406
9.8.4 Demonstrating When Constructors and Destructors Are Called 406
9.9 Time Class Case Study: A Subtle Trap—Returning a Reference or a
Pointer to a private Data Member 409
9.10 Default Memberwise Assignment 411
9.11 const Objects and const Member Functions 413
9.12 Composition: Objects as Members of Classes 415
9.13 friend Functions and friend Classes 421
9.14 Using the this Pointer 423
9.14.1 Implicitly and Explicitly Using the this Pointer to Access an
Object’s Data Members 424
9.14.2 Using the this Pointer to Enable Cascaded Function Calls 425
9.15 static Class Members 429
9.15.1 Motivating Classwide Data 429
9.15.2 Scope and Initialization of static Data Members 429
9.15.3 Accessing static Data Members 430
9.15.4 Demonstrating static Data Members 430
9.16 Wrap-Up 433
E Preprocessor 981
E.1 Introduction 982
E.2 #include Preprocessing Directive 982
E.3 #define Preprocessing Directive: Symbolic Constants 983
E.4 #define Preprocessing Directive: Macros 983
E.5 Conditional Compilation 985
E.6 #error and #pragma Preprocessing Directives 987
E.7 Operators # and ## 987
E.8 Predefined Symbolic Constants 987
E.9 Assertions 988
E.10 Wrap-Up 988
Chapters 23–26 and Appendices F–J are PDF documents posted online at the book’s
Companion Website, which is accessible from
http://www.pearsonhighered.com/deitel
23 Other Topics
24 C++11 and C++14: Additional Features
25 ATM Case Study, Part 1: Object-Oriented
Design with the UM
26 ATM Case Study, Part 2: Implementing an
Object-Oriented Design
xxii Contents
and
http://www.pearsonhighered.com/deitel
Use the source code we provide to run each program as you study it.
1. Computer Science Curricula 2013 Curriculum Guidelines for Undergraduate Degree Programs in Com-
puter Science, December 20, 2013, The Joint Task Force on Computing Curricula, Association for
Computing Machinery (ACM), IEEE Computer Society.
Another Random Scribd Document
with Unrelated Content
—Le diré a usted. Actualmente mi sobrino Rontignon sencillamente
me estorba. Si lo hubiera casado con madama Luxe, yo hubiera sido
su administrador; pero no ha sido bastante hábil para enamorar a la
viuda. Ahora quiero desprenderme de él, y como ha aparecido como
un realista que ha mandado informes al Gobierno español por
intermedio de esas damas del Chalet de las Hiedras, he pensado
hacer valer esos servicios y su calidad de ex teniente de la Guardia
Real para pedir para él un destino en España. ¿Usted, que
seguramente sabrá cómo se hace esto, no podría escribirme una
solicitud en español?
—Sí; lo haré.
—¿Ahora mismo?
—Sí; ahora mismo.
Aviraneta escribió un borrador de solicitud y lo entregó para que lo
copiase Choribide.
Al terminar, Choribide dió las gracias a Aviraneta y murmuró
efusivamente:
—¡Cómo nos desperdician, mi querido señor!
Y haciendo una reverencia llena de respeto y de gracia,
completamente siglo XVIII, Choribide se retiró y salió de la Veleta.
LIBRO TERCERO
EL DIARIO DE LACY
I.
EL SOÑADOR
Eusebio de Lacy escribió con detalles su vida en los días que duró la
expedición de los liberales en la frontera. Lacy esperaba una lucha
más brillante, más intensa. En su diario se le ve, a pesar suyo,
desencantado y triste. Su espíritu de soñador y de poeta se
representaba la realidad como algo más fuerte, más noble, más
extraordinario.
Lacy tenía un entusiasmo todavía latente por los militares y por la
guerra. Concebido en época de grandes batallas, su infancia se
había arrullado con la música estridente de las trompetas y de los
tambores. Más tarde había sido educado en colegios con hijos de
militares franceses del Imperio, todos estremecidos y pasmados de
asombro ante las glorias más o menos inventadas de Napoleón y de
su ejército.
Eusebio pensaba en su padre, y se lo figuraba como le había visto
en los retratos y en las estampas, vestido de general, con el pecho
lleno de cruces ganadas en los campos de batalla, el rostro fiero, la
mirada relampagueante y la mano en la empuñadura de la espada.
Después de los años de colegio en Francia y en España, Eusebio
había vivido en Quimper, en casa de su madre, en un ambiente
pesado, lánguido, de un pueblo bretón oscuro, en una sociedad
levítica de comerciantes y de armadores, dirigida por realistas y por
curas.
Era aquella época de la Restauración, una época de luchas ardientes
en que el monarquismo y el jesuitismo se aprestaban al combate
contra las ideas revolucionarias con todas las armas; las misiones
religiosas se esparcían por las ciudades y por los campos, Francia
entera estaba llena de oradores elocuentes que predicaban el
arrepentimiento de las locuras pasadas. Los misioneros quemaban
en las plazas públicas los libros de Voltaire y los tomos de la
Enciclopedia, las familias enviaban sus hijos a los colegios de
jesuítas, las autoridades obedecían servilmente a las Congregaciones
y todo se conseguía con intrigas. Por entonces se hablaba de los
monstruos del 93 y del ogro de Córcega.
Durante este tiempo, Eusebio había adorado la gloria y el ejército,
sólo por la gloria y por contraposición a las ideas y prácticas
clericales que trataban de imbuirle. Después fué llegando hasta él,
cada vez con más intensidad, la influencia liberal, y reaccionando
contra sus sueños militares, llegó a mirar a Napoleón como un
ambicioso, antihumano y repugnante, y a sus mariscales como una
tropa de brutos miserables dedicados únicamente a la petulancia y al
robo.
Lacy creyó haber matado su entusiasmo de gloria y haberlo
sustituído por el ideal más severo de la libertad; pero por debajo de
éste se transparentaban sus sueños de ambición militar.
En su diario se ve que estos sueños pierden su brillo y decaen las
ilusiones de Lacy.
II.
LA ENTRADA EN ESPAÑA
Urdax, 16 Octubre.
Zugarramurdi, 17 Octubre.
Vera, 18 Octubre.
EL LEÑADOR DE ANTULA
ATAQUE DE JUANITO
Zugarramurdi, 20 Octubre.
CHAPALANGARRA
Zugarramurdi, 21 Octubre.
NOTICIAS DE MINA
Errota-sarreco-borda, 23 Octubre.
ebooksecure.com