7-PDF49-52_c++ programming

Erich Gamma et al.: Design Patterns: Elements of Reusable Object-Oriented
Notes to the Reader
Chapter 1
Douglas Gregor et al.: Concepts: Linguistic Support for Generic Programming in C++. OOPSLA'06.
John L. Hennessy and David A. Patterson: Computer Architecture, Fifth Edi[Gamma,1995]
tion: A Quantitative Approach. Morgan Kaufmann. San Francisco, California. 2011. ISBN 978-0123838728.
Jean D. Ichbiah et al.: Rationale for the Design of the ADA
Language. SIGPLAN Notices. Vol. 14, No. 6. June 1979.
Yogeesh H. Kamath, Ruth E. Smilan, and Jean G. Smith: Reaping
with Object-Oriented Technology. AT&T Technical Journal. Vol. 72, No.
September/October 1993.
Brian W. Kernighan and Dennis M. Ritchie: The C Programming Language.
Prentice Hall. Englewood Cliffs, New Jersey. 1978.
Brian W. Kernighan and Dennis M. Ritchie: The C Programming Language,
Second Edition. Prentice-Hall. Englewood Cliffs, New Jersey. 1988. ISBN
Donald E. Knuth: The Art of Computer Programming.
Reading, Massachusetts. 1968.
Andrew Koenig and Bjarne Stroustrup: C++: As close to C as possible - but
no closer. The C++ Report. Vol. 1, No. 7. July 1989.
A. R. Koenig and B. Stroustrup: Exception Handling for C++ (revised).
Proc USENIX C++ Conference. April 1990.
Joseph C. Kolecki: An Introduction to Tensors for Students of Physics
Engineering. NASA/TM-2002-211716.
Angelika Langer and Klaus Kreft: Standard C++ IOStreams and Locales:
Advanced Programmer's Guide and Reference.
Addison-Wesley. 2000.
ISBN 978-0201183955.
Paul E. McKenney: Is Parallel Programming Hard, And, If So, What
You Do About It? kernel.org. Corvallis, Oregon. 2012.
John Maddock: Boost.Regex. www.boost.org. 2009.
George Orwell: 1984. Secker and Warburg. London. 1949.
Larry C. Paulson: ML for the Working Programmer. Cambridge
Press. Cambridge. 1996. ISBN 0-521-56543-X.
P. Pirkelbauer, Y. Solodkyy, and B. Stroustrup: Design and Evaluation of
C++ Open Multi-Methods. Science of Computer Programming. Elsevier
Journal. June 2009. doi:10.1016/j.scico.2009.06.002.
Martin Richards and Colin Whitby-Strevens: BCPL - The Language and Its
ROOT: A Data Analysis Framework. root.cern.ch. It seems appropriate
represent a tool from CERN, the birthplace of the World Wide Web,
Section 1.6
Web address.
M. Rozier et al.: CHORUS Distributed Operating Systems. Computing Systems. Vol. 1, No. 4. Fall 1988.
Jeremy G. Siek and Andrew Lumsdaine: Concept checking:
Binding parametric polymorphism in C++. Proc. First Workshop on C++ Template
Programming. Erfurt, Germany. 2000.
Y. Solodkyy, G. Dos Reis, and B. Stroustrup: Open and Efficient Type Switch
for C++. Proc. OOPSLA'12.
Alexander Stepanov and Meng Lee: The Standard Template Library. HP
Labs Technical Report HPL-94-34 (R. 1). 1994.
G. W. Stewart: Matrix Algorithms, Volume I. Basic Decompositions. SIAM.
Philadelphia, Pennsylvania. 1998.
B. Stroustrup: Classes: An Abstract Data Type Facility for the C
Sigplan Notices. January 1982.
The first public description of ''C with
B. Stroustrup: Operator Overloading in C++. Proc. IFIP WG2.4 Conference on System Implementation Languages: Experience &
September 1984.
B. Stroustrup: An Extensible I/O Facility for C++.
Proc. Summer 1985
USENIX Conference.
B. Stroustrup: The C++ Programming Language. Addison-Wesley. Reading, Massachusetts. 1986. ISBN 0-201-12078-X.
B. Stroustrup: Multiple Inheritance for C++. Proc. EUUG Spring Conference. May 1987.
B. Stroustrup and J. Shopiro: A Set of C Classes for Co-Routine Style
Proc. USENIX C++ Conference.
Santa Fe, New
November 1987.
B. Stroustrup: Parameterized Types for C++. Proc. USENIX C++ Conference, Denver. 1988.
B. Stroustrup: The C++ Programming Language (Second Edition). Addison-Wesley. Reading, Massachusetts. 1991. ISBN 0-201-53992-6.
B. Stroustrup: A History of C++: 1979-1991. Proc. ACM History of
Programming Languages conference (HOPL-2). ACM Sigplan Notices. Vol 28,
No 3. 1993.
B. Stroustrup: The Design and Evolution of C++. Addison-Wesley.
Reading, Mass. 1994. ISBN 0-201-54330-3.
B. Stroustrup: The C++ Programming Language, Third Edition. AddisonWesley. Reading, Massachusetts. 1997. ISBN 0-201-88954-4. Hardcover
(''Special'') Edition. 2000. ISBN 0-201-70073-5.
B. Stroustrup: C and C++: Siblings, C and C++: A Case for Compatibility,
and C and C++: Case Studies in Compatibility. The C/C++ Users
July-September 2002. www.stroustrup.com/papers.html.
B. Stroustrup: Evolving a language in and for the real world:
1991-2006. ACM HOPL-III. June 2007.
Notes to the Reader
Chapter 1
B. Stroustrup: Programming - Principles and Practice Using C++. Addison-Wesley. 2009. ISBN 0-321-54372-6.
B. Stroustrup: The C++11 FAQ. www.stroustrup.com/C++11FAQ.html.
B. Stroustrup: The C++0x ''Remove Concepts'' Decision. Dr. Dobb's Journal. July 2009.
B. Stroustrup and A. Sutton: A Concept Design for the STL. WG21 Technical Report N3351==12-0041. January 2012.
B. Stroustrup: Software Development for Infrastructure. Computer. January
2012. doi:10.1109/MC.2011.353.
A. Sutton and B. Stroustrup: Design of Concept Libraries for C++. Proc.
SLE 2011 (International Conference on Software Language Engineering).
July 2011.
Andrew S. Tanenbaum: Modern Operating Systems, Third Edition. Prentice
Hall. Upper Saddle River, New Jersey. 2007. ISBN 0-13-600663-9.
Dan Tsafrir et al.: Minimizing Dependencies within Generic Classes for
Faster and Smaller Programs. ACM OOPSLA'09. October 2009.
The Unicode Consortium: The Unicode Standard, Version 2.0.
AddisonWesley. Reading, Massachusetts. 1996. ISBN 0-201-48345-9.
UNIX Time-Sharing System: Programmer's Manual.
Research Version,
Tenth Edition. AT&T Bell Laboratories, Murray Hill, New Jersey. February
David Vandevoorde and Nicolai M. Josuttis: C++ Templates: The
ISBN 0-201-73484-2.
Todd Veldhuizen:
The C++ Report. June 1995.
Todd L. Veldhuizen: C++ Templates are Turing Complete. Indiana
University Computer Science Technical Report. 2003.
Jefferey Scott Vitter: Random Sampling with a Reservoir. ACM Transactions on Mathematical Software, Vol. 11, No. 1. 1985.
ISO SC22/WG21 The C++ Programming Language Standards Committee:
Document Archive. www.open-std.org/jtc1/sc22/wg21.
Anthony Williams: C++ Concurrency in Action - Practical Multithreading.
Manning Publications Co. ISBN 978-1933988771.
Gregory V. Wilson and Paul Lu (editors): Parallel Programming Using C++.
The MIT Press. Cambridge, Mass. 1996. ISBN 0-262-73118-5.
Alistair Wood: Introduction to Numerical Analysis. Addison-Wesley. Reading, Massachusetts. 1999. ISBN 0-201-34291-X.
P. M. Woodward and S. G. Bond: Algol 68-R Users Guide. Her
Stationery Office. London. 1974.
A Tour of C++: The Basics
The first thing we do, let's
kill all the language lawyers.
- Henry VI, Part II
The Basics
Hello, World!; Types, Variables, and Arithmetic; Constants; Tests and Loops; Pointers,
Arrays, and Loops
User-Defined Types
Structures; Classes; Enumerations
Separate Compilation; Namespaces; Error Handling
The aim of this chapter and the next three is to give you an idea of what C++ is, without going into
a lot of details. This chapter informally presents the notation of C++, C++'s model of memory and
computation, and the basic mechanisms for organizing code into a program. These are the language facilities supporting the styles most often seen in C and sometimes called procedural programming. Chapter 3 follows up by presenting C++'s abstraction mechanisms. Chapter 4 and
Chapter 5 give examples of standard-library facilities.
The assumption is that you have programmed before. If not, please consider reading a textbook, such as Programming: Principles and Practice Using C++ [Stroustrup,2009], before continuing here. Even if you have programmed before, the language you used or the applications you
wrote may be very different from the style of C++ presented here. If you find this ''lightning tour''
confusing, skip to the more systematic presentation starting in Chapter 6.