logo资料库

C++17_By_Example - 2018.pdf

第1页 / 共629页
第2页 / 共629页
第3页 / 共629页
第4页 / 共629页
第5页 / 共629页
第6页 / 共629页
第7页 / 共629页
第8页 / 共629页
资料共629页,剩余部分请下载后查看
Title Page
Copyright and Credits
C++17 By Example
Dedication
Packt Upsell
Why subscribe?
PacktPub.com
Contributors
About the author
About the reviewer
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Get in touch
Reviews
Getting Started with C++
Rolling the dice
Understanding classes – the Car class
Extending the Car class
A class hierarchy – the Person, Student, and Employee classes
A simple data type – the stack
A more advanced data type – the queue
Summary
Data Structures and Algorithms
The List class
The Cell class
The Iterator class
The List class
Adding a list to an existing list
Erasing a value from the list
The Set class
Union, intersection, and difference operations
Basic searching and sorting
The select sort algorithm
The insert sort algorithm
The bubble sort algorithm
The extended List class
The ReverseIterator class
The extended Set class
Union, intersection, and difference
Advanced searching and sorting
The merge sort algorithm
The quick sort algorithm
Summary
Building a Library Management System
The Book class
Writing the book
Reading the book
Borrowing and reserving the book
Displaying the book
The Customer class
Reading the customer from a file
Writing the customer to a file
Borrowing and reserving a book
Displaying the customer
The Library class
Looking up books and customers
Adding a book
Deleting a book
Listing the books
Adding a customer
Deleting a customer
Listing the customers
Borrowing a book
Reserving a book
Returning a Book
Saving the library information to a file
Loading the library information from a file
The main function
Summary
Library Management System with Pointers
The Book class
Reading and writing the book
Borrowing and reserving the book
Displaying the book
The Customer class
Reading and writing the customer
Borrowing and reserving a book
Displaying the customer
The Library class
Looking up books and customers
Adding a book
Deleting a book
Listing the books
Adding a customer
Deleting a customer
Listing the customers
Borrowing a book
Reserving a book
Returning a book
Looking up books and customers
Marshmallowing
Saving the library information to a file
Writing the book objects
Writing the customer objects
Writing the borrower index
Writing the reservation indexes
Writing the loan book indexes
Writing the reservation book indexes
Loading the library information from a file
Reading the book objects
Reading the customer objects
Reading the borrower index
Reading the reservation indexes
Reading the loan book indexes
Reading the reservation book indexes
Deallocating memory
The main function
Summary
Qt Graphical Applications
Creating the clock application
Setting up the environment
The Clock class
The main function
Setting up reusable classes for windows and widgets
Adding a listener
The base window class
The base widget class
Building the drawing program
The Figure base class
The Line sub class
The Rectangle sub class
The Ellipse sub class
Drawing the window
Drawing the widget
The main function
Building an editor
The Caret class
Drawing the editor window
Drawing the editor widget
The main function
Summary
Enhancing the Qt Graphical Applications
Improving the clock
The Clock class
The main function
Improving the drawing program
The Figure class
The Line class
The Rectangle class
The Ellipse class
The DrawingWindow class
The DrawingWidget class
The main function
Improving the editor
The EditorWindow class
The EditorWidget class
The main function
Summary
The Games
Othello
The game widget
The OthelloWindow class
The OthelloWidget class
The main function
Noughts and crosses
The NaCWindow class
The NaCWidget class
The main function
Summary
The Computer Plays
Othello
The OthelloWindow class
The OthelloWidget Class
The main function
Noughts and Crosses
The NaCWindow class
The NaCWidget class
The main function
Summary
Domain-Specific Language
Introducing the source language – a simple example
The grammar of the source language
The target language
The colors
Error handling
The value
The scanner
Building the parser
Parsing the instructions of the language
Parsing the expressions of the language
Type checking the expression
Evaluating the values of the expressions
The viewer
The main function
Summary
Advanced Domain-Specific Language
Improving the source language – an example
Improving the grammar
The Token and the Scanner
The parser
The evaluator
The main function
Summary
Other Books You May Enjoy
Leave a review - let other readers know what you think
C++17 By Example Practical projects to get you up and running with C++17 Stefan Björnander
BIRMINGHAM - MUMBAI
C++17 By Example Copyright © 2018 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. Commissioning Editor: Merint Mathew Acquisition Editor: Chaitanya Nair Content Development Editor: Lawrence Veigas Technical Editor: Adhithya Haridas Copy Editor: Safis Editing Project Coordinator: Prajakta Naik Proofreader: Safis Editing Indexer: Aishwarya Gangawane Graphics: Jisha Chirayil Production Coordinator: Deepika Naik First published: February 2018 Production reference: 1220218 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-78839-181-8 www.packtpub.com
I dedicate this book to my parents, Ralf and Gunilla, my sister, Catharina, her husband, Magnus, and their sons, Emil and Rasmus.
mapt.io Mapt is an online digital library that gives you full access to over 5,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career. For more information, please visit our website.
Why subscribe? Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionals Improve your learning with Skill Plans built especially for you Get a free eBook or video every month Mapt is fully searchable Copy and paste, print, and bookmark content
PacktPub.com Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.Packt Pub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at service@packtpub.com for more details. At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks.
分享到:
收藏