Programming

Programming : Principles and Practice Using C++

4.15 (263 ratings by Goodreads)
By (author) 

List price: US$74.99

Currently unavailable

Add to wishlist

AbeBooks may have this title (opens in new window).

Try AbeBooks

Description

An Introduction to Programming by the Inventor of C++ Preparation for Programming in the Real World The book assumes that you aim eventually to write non-trivial programs, whether for work in software development or in some other technical field. Focus on Fundamental Concepts and Techniques The book explains fundamental concepts and techniques in greater depth than traditional introductions. This approach will give you a solid foundation for writing useful, correct, maintainable, and efficient code. Programming with Today's C++ The book is an introduction to programming in general, including object-oriented programming and generic programming. It is also a solid introduction to the C++ programming language, one of the most widely used languages for real-world software. The book presents modern C++ programming techniques from the start, introducing the C++ standard library to simplify programming tasks. For Beginners-And Anyone Who Wants to Learn Something New The book is primarily designed for people who have never programmed before, and it has been tested with more than 1,000 first-year university students. However, practitioners and advanced students will gain new insight and guidance by seeing how a recognized master approaches the elements of his art. Provides a Broad View The first half of the book covers a wide range of essential concepts, design and programming techniques, language features, and libraries. Those will enable you to write programs involving input, output, computation, and simple graphics. The second half explores more specialized topics, such as text processing and testing, and provides abundant reference material. Source code and support supplements are available from the author's website.
show more

Product details

  • Paperback | 1272 pages
  • 186 x 234 x 44mm | 1,759.93g
  • Addison-Wesley Educational Publishers Inc
  • New Jersey, United States
  • English
  • 0321543726
  • 9780321543721
  • 145,920

About Bjarne Stroustrup

Bjarne Stroustrup is the designer and original implementer of C++, the author of The C++ Programming Language, The Annotated C++ Reference Manual, and The Design and Evolution of C++, and the consulting editor of Addison-Wesley's C++ In-Depth Series. Having previously worked at Bell Labs and AT&T Labs-Research, he currently is the College of Engineering Chair in Computer Science Professor at Texas A&M University. The recipient of numerous honors, including the Dr. Dobb's Excellence in Programming Award (2008), Dr. Stroustrup is a member of the National Academy of Engineering, an AT&T Fellow, an AT&T Bell Laboratories Fellow, an IEEE Fellow, and an ACM Fellow. His research interests include distributed systems, simulation, design, programming techniques, software development tools, and programming languages, and he remains actively involved in the ANSI/ISO standardization of C++. Dr. Stroustrup holds an advanced degree from the University of Aarhus in his native Denmark and a Ph.D. in Computer Science from Cambridge University, England.
show more

Table of contents

Preface xxiii Chapter 0: Notes to the Reader 10.1 The structure of this book 20.2 A philosophy of teaching and learning 60.3 Programming and computer science 120.4 Creativity and problem solving 120.5 Request for feedback 120.6 References 130.7 Biographies 14 Chapter 1: Computers, People, and Programming 171.1 Introduction 181.2 Software 191.3 People 211.4 Computer science 241.5 Computers are everywhere 251.6 Ideals for programmers 34 Part I: The Basics 41 Chapter 2: Hello,World! 432.1 Programs 442.2 The classic first program 452.3 Compilation 472.4 Linking 512.5 Programming environments 52 Chapter 3: Objects, Types, and Values 593.1 Input 603.2 Variables 623.3 Input and type 643.4 Operations and operators 663.5 Assignment and initialization 693.6 Composite assignment operators 733.7 Names 743.8 Types and objects 773.9 Type safety 78 Chapter 4: Computation 894.1 Computation 904.2 Objectives and tools 924.3 Expressions 944.4 Statements 994.5 Functions 1124.6 Vector 1164.7 Language features 123 Chapter 5: Errors 1315.1 Introduction 1325.2 Sources of errors 1345.3 Compile-time errors 1345.4 Link-time errors 1375.5 Run-time errors 1385.6 Exceptions 1445.7 Logic errors 1525.8 Estimation 1555.9 Debugging 1565.10 Pre- and post-conditions 1615.11 Testing 164 Chapter 6: Writing a Program 1716.1 A problem 1726.2 Thinking about the problem 1736.3 Back to the calculator! 1766.4 Grammars 1866.5 Turning a grammar into code 1936.6 Trying the first version 2016.7 Trying the second version 2066.8 Token streams 2076.9 Program structure 213 Chapter 7: Completing a Program 2197.1 Introduction 2207.2 Input and output 2207.3 Error handling 2227.4 Negative numbers 2277.5 Remainder: % 2287.6 Cleaning up the code 2317.7 Recovering from errors 2387.8 Variables 241 Chapter 8: Technicalities: Functions, etc. 2538.1 Technicalities 2548.2 Declarations and definitions 2558.3 Header files 2618.4 Scope 2648.5 Function call and return 2698.6 Order of evaluation 2878.7 Namespaces 290 Chapter 9: Technicalities: Classes, etc. 2999.1 User-defined types 3009.2 Classes and members 3019.3 Interface and implementation 3029.4 Evolving a class 3049.5 Enumerations 3149.6 Operator overloading 3169.7 Class interfaces 3189.8 The Date class 328 Part II: Input and Output 337 Chapter 10: Input and Output Streams 33910.1 Input and output 34010.2 The I/O stream model 34110.3 Files 34310.4 Opening a file 34410.5 Reading and writing a file 34610.6 I/O error handling 34810.7 Reading a single value 35210.8 User-defined output operators 35710.9 User-defined input operators 35910.10 A standard input loop 35910.11 Reading a structured file 361 Chapter 11: Customizing Input and Output 37511.1 Regularity and irregularity 37611.2 Output formatting 37611.3 File opening and positioning 38411.4 String streams 39011.5 Line-oriented input 39111.6 Character classification 39211.7 Using nonstandard separators 39411.8 And there is so much more 401 Chapter 12: A Display Model 40712.1 Why graphics? 40812.2 A display model 40912.3 A first example 41012.4 Using a GUI library 41412.5 Coordinates 41512.6 Shapes 41612.7 Using Shape primitives 41712.8 Getting this to run 431 Chapter 13: Graphics Classes 43713.1 Overview of graphics classes 43813.2 Point and Line 44013.3 Lines 44313.4 Color 44513.5 Line_style 44813.6 Open_polyline 45013.7 Closed_polyline 45113.8 Polygon 45313.9 Rectangle 45513.10 Managing unnamed objects 45913.11 Text 46213.12 Circle 46413.13 Ellipse 46613.14 Marked_polyline 46813.15 Marks 46913.16 Mark 47013.17 Images 472 Chapter 14: Graphics Class Design 47914.1 Design principles 48014.2 Shape 48514.3 Base and derived classes 49614.4 Benefits of object-oriented programming 504 Chapter 15: Graphing Functions and Data 50915.1 Introduction 51015.2 Graphing simple functions 51015.3 Function 51415.4 Axis 51815.5 Approximation 52115.6 Graphing data 526 Chapter 16: Graphical User Interfaces 53916.1 User interface alternatives 54016.2 The "Next" button 54116.3 A simple window 54216.4 Button and other Widgets 54816.5 An example 55216.6 Control inversion 55616.7 Adding a menu 55716.8 Debugging GUI code 562 Part III: Data and Algorithms 567 Chapter 17: Vector and Free Store 56917.1 Introduction 57017.2 vector basics 57217.3 Memory, addresses, and pointers 57417.4 Free store and pointers 57717.5 Destructors 58617.6 Access to elements 59017.7 Pointers to class objects 59117.8 Messing with types: void* and casts 59317.9 Pointers and references 59517.10 The this pointer 603 Chapter 18: Vectors and Arrays 61118.1 Introduction 61218.2 Copying 61318.3 Essential operations 62018.4 Access to vector elements 62518.5 Arrays 62718.6 Examples: palindrome 637 Chapter 19: Vector, Templates, and Exceptions 64519.1 The problems 64619.2 Changing size 64919.3 Templates 65619.4 Range checking and exceptions 66819.5 Resources and exceptions 672 Chapter 20: Containers and Iterators 68520.1 Storing and processing data 68620.2 STL ideals 69020.3 Sequences and iterators 69420.4 Linked lists 69820.5 Generalizing vector yet again 70320.6 An example: a simple text editor 70420.7 vector, list, and string 71120.8 Adapting our vector to the STL 71520.9 Adapting built-in arrays to the STL 71820.10 Container overview 719 Chapter 21: Algorithms and Maps 72721.1 Standard library algorithms 72821.2 The simplest algorithm: find() 72921.3 The general search: find_if() 73221.4 Function objects 73421.5 Numerical algorithms 73821.6 Associative containers 74421.7 Copying 75721.8 Sorting and searching 762 Part IV: Broadening the View 769 Chapter 22: Ideals and History 77122.1 History, ideals, and professionalism 77222.2 Programming language history overview 783 Chapter 23: Text Manipulation 81323.1 Text 81423.2 Strings 81423.3 I/O streams 81923.4 Maps 82023.5 A problem 82823.6 The idea of regular expressions 83023.7 Searching with regular expressions 83323.8 Regular expression syntax 83623.9 Matching with regular expressions 84423.10 References 849 Chapter 24: Numerics 85324.1 Introduction 85424.2 Size, precision, and overflow 85424.3 Arrays 85924.4 C-style multidimensional arrays 85924.5 The Matrix library 86124.6 An example: solving linear equations 87224.7 Random numbers 87724.8 The standard mathematical functions 87924.9 Complex numbers 88024.10 References 882 Chapter 25: Embedded Systems Programming 88725.1 Embedded systems 88825.2 Basic concepts 89125.3 Memory management 89725.4 Addresses, pointers, and arrays 90525.5 Bits, bytes, and words 91625.6 Coding standards 935 Chapter 26: Testing 94926.1 What we want 95026.2 Proofs 95226.3 Testing 95226.4 Design for testing 97826.5 Debugging 97926.6 Performance 97926.7 References 983 Chapter 27: The C Programming Language 98727.1 C and C++: siblings 98827.2 Functions 99427.3 Minor language differences 100227.4 Free store 100927.5 C-style strings 101127.6 Input/output: stdio 101627.7 Constants and macros 102027.8 Macros 102127.9 An example: intrusive containers 1025 Part V: Appendices 1035 Appendix A: Language Summary 1037A.1 General 1038A.2 Literals 1041A.3 Identifiers 1045A.4 Scope, storage class, and lifetime 1046A.5 Expressions 1049A.6 Statements 1059A.7 Declarations 1061A.8 Built-in types 1062A.9 Functions 1066A.10 User-defined types 1069A.11 Enumerations 1070A.12 Classes 1071A.13 Templates 1083A.14 Exceptions 1086A.15 Namespaces 1088A.16 Aliases 1089A.17 Preprocessor directives 1090 Appendix B: Standard Library Summary 1093B.1 Overview 1094B.3 Iterators 1100B.4 Containers 1105B.5 Algorithms 1112B.6 STL utilities 1121B.7 I/O streams 1124B.8 String manipulation 1131B.9 Numerics 1135B.10 C standard library functions 1140B.11 Other libraries 1150 Appendix C: Getting Started with Visual Studio 1151C.1 Getting a program to run 1152C.2 Installing Visual Studio 1152C.3 Creating and running a program 1153C.4 Later 1155 Appendix D: Installing FLTK 1157D.1 Introduction 1158D.2 Downloading FLTK 1158D.3 Installing FLTK 1159D.4 Using FLTK in Visual Studio 1159D.5 Testing if it all worked 1160 Appendix E: GUI Implementation 1161E.1 Callback implementation 1162E.2 Widget implementation 1163E.3 Window implementation 1164E.4 Vector_ref 1166E.5 An example: manipulating Widgets 1167 Glossary 1171Bibliography 1177Index 1181
show more

Rating details

263 ratings
4.15 out of 5 stars
5 51% (133)
4 26% (69)
3 15% (40)
2 5% (12)
1 3% (9)
Book ratings by Goodreads
Goodreads is the world's largest site for readers with over 50 million reviews. We're featuring millions of their reader ratings on our book pages to help you find your new favourite book. Close X