C++17 By Example: Practical projects to get you up and running with C++17

Packt Publishing Ltd
Free sample

Discover the impressive capabilities of C++ and learn the skills you need to implement it in real lifeKey Features
  • Leverage the power of C++ language constructs to build effective software
  • Learn about file handling and pointers
  • Build visually appealing GUI by using the power of Qt5
  • Get a deeper understanding of how to program C++ for a specific purpose by implementing a Domain Specific Language
Book Description

C++ is a general-purpose programming language built with a bias towards embedded programming and systems programming. Over the years, C++ has evolved and is used to develop software for many different sectors. Given its versatility and robustness, C++is a wonderful language to start your coding journey with. This book covers exciting projects built in C++ that show how to implement the language in different scenarios. While developing these projects, you will not only learn the language constructs but also how you can use C++ to meet your software requirements.

The book starts with a brief introduction to C++ language constructs where you will learn essential concepts that are required to understand the projects covered in the book. The first module will build a library management system that will teach you how to perform efficient file handling and use pointers in your software. To give you a taste of GUI programming, the next module will build graphical applications using Qt 5. You will then be introduced to game design in C++ and build two interesting games. The final module will teach you how C++ can be used to create a Domain Specific Language.

After reading this book, you will have mastered core programming concepts in C++, and how to implement them effectively.

What you will learn
  • Create object-oriented hierarchies and how to compile, link, and execute a simple program
  • Implement classes with linked lists, templates, inheritance, operator overloading, and exception handling
  • Efficient file handling and pointer structures
  • Dynamic allocation and deallocation along with marshmallowing
  • Qt features, including menus, toolbars, caret handling, and more
  • Implement a Domain Specific Language in C++
Who this book is for

This book is for developers who would like to develop software in C++. Basic programming experience would be an added advantage.

Read more

About the author

Stefan Björnander is the author of the books Microsoft Windows C++ and C++ Windows Programming. He holds a Master of Engineering and a Licentiate in Computer Science. He has worked as a software developer and as a teacher in computer science and mathematics for many years.
Read more

Additional Information

Packt Publishing Ltd
Read more
Published on
Feb 26, 2018
Read more
Read more
Read more
Read more
Read more
Read more
Computers / Programming Languages / C
Computers / Programming Languages / General
Read more
Content Protection
This content is DRM free.
Read more
Read Aloud
Available on Android devices
Read more

Reading information

Smartphones and Tablets

Install the Google Play Books app for Android and iPad/iPhone. It syncs automatically with your account and allows you to read online or offline wherever you are.

Laptops and Computers

You can read books purchased on Google Play using your computer's web browser.

eReaders and other devices

To read on e-ink devices like the Sony eReader or Barnes & Noble Nook, you'll need to download a file and transfer it to your device. Please follow the detailed Help center instructions to transfer the files to supported eReaders.
Coming to grips with C++11 and C++14 is more than a matter of familiarizing yourself with the features they introduce (e.g., auto type declarations, move semantics, lambda expressions, and concurrency support). The challenge is learning to use those features effectively—so that your software is correct, efficient, maintainable, and portable. That’s where this practical book comes in. It describes how to write truly great software using C++11 and C++14—i.e. using modern C++.

Topics include:

The pros and cons of braced initialization, noexcept specifications, perfect forwarding, and smart pointer make functionsThe relationships among std::move, std::forward, rvalue references, and universal referencesTechniques for writing clear, correct, effective lambda expressionsHow std::atomic differs from volatile, how each should be used, and how they relate to C++'s concurrency APIHow best practices in "old" C++ programming (i.e., C++98) require revision for software development in modern C++

Effective Modern C++ follows the proven guideline-based, example-driven format of Scott Meyers' earlier books, but covers entirely new material.

"After I learned the C++ basics, I then learned how to use C++ in production code from Meyer's series of Effective C++ books. Effective Modern C++ is the most important how-to book for advice on key guidelines, styles, and idioms to use modern C++ effectively and well. Don't own it yet? Buy this one. Now".

-- Herb Sutter, Chair of ISO C++ Standards Committee and C++ Software Architect at Microsoft

“Foy is a gifted writer and his descriptions of the philosophies that( impacted the design and implementation of Merb are definitely useful to( everyone affected by the changes in Rails 3.”

—Obie Fernandez, Series Editor

The Expert Guide to Building Merb Applications

Thousands of Ruby and Rails developers are discovering the extraordinary scalability, agility, flexibility, and performance offered by the new Merb MVC framework. The Merb Way is the first comprehensive guide to using, extending, and deploying Merb. Like the bestseller The Rails Way (Addison-Wesley, 2008), this book can either be read cover-to-cover as a tutorial or used for modular coverage that makes it an ideal task reference. Foy Savas systematically covers everything developers need to know to build production-quality Merb applications, offering detailed code examples for jumpstarting virtually any project.

Savas is not only involved in the Merb project as an open source contributor: He uses Merb every day as a professional developer. Drawing on his extensive practical expertise, he delves deeply into the Merb framework’s architecture and source code, revealing its elegance and offering powerful best practices for using it. To maximize this book’s practical value, he also covers the tools most widely used alongside Merb, including the DataMapper ORM, the RSpec tester (and associated behavior-driven development techniques), and several leading Merb plugins.

The Merb Way will help you

Master Merb innovations that will be incorporated into Rails 3 Understand the fundamentals of Merb development, one step at a time Use Merb’s sophisticated application router to guide incoming requests Explore the Merb stack, master its configuration options, and dive into its internals Use Merb controllers to integrate application code, handle responses, and manage sessions, filters, and exceptions Build templates with both ERB (Erubis) and HAML Use the DataMapper ORM to represent object properties and behaviors Learn best practices for RESTful development with Merb Leverage Helpers to simplify many common development tasks Refactor code, encapsulate it in gems, and share it across multiple applications Customize the responses your application sends to each user Gain a deep, practical understanding of Merb plugins and extensibility Authenticate users with Merb’s modular authentication plugin Configure, generate, describe, and test Merb mailers Use the merb-parts gem to create component-like regions on Web pages Cache content to relieve stress on Web servers Make the most of Behavior Driven Development and testing with RSpec
You Will Learn Ruby!

Zed Shaw has perfected the world’s best system for learning Ruby. Follow it and you will succeed—just like the hundreds of thousands of beginners Zed has taught to date! You bring the discipline, commitment, and persistence; the author supplies everything else.

In Learn Ruby the Hard Way, Third Edition , you’ll learn Ruby by working through 52 brilliantly crafted exercises. Read them. Type their code precisely. (No copying and pasting!) Fix your mistakes. Watch the programs run. As you do, you’ll learn how software works; what good programs look like; how to read, write, and think about code; and how to find and fix your mistakes using tricks professional programmers use. Most importantly, you’ll learn the following, which you need to start writing excellent Ruby software of your own:

• Installing your Ruby environment

• Organizing and writing code

• Ruby symbols and keywords

• Basic mathematics

• Variables and printing

• Strings and text

• Interacting with users

• Working with files

• Using and creating functions

• Looping and logic

• Arrays and elements

• Hashmaps

• Program design

• Object-oriented programming

• Inheritance and composition

• Modules, classes, and objects

• Project “skeleton” directories

• Debugging and automated testing

• Advanced user input

• Text processing

• Basic game development

• Basic web development

It’ll Be Hard At First. But Soon, You’ll Just Get It—And That Will Feel Great!

This tutorial will reward you for every minute you put into it. Soon, you’ll know one of the world’s most powerful, popular programming languages. You’ll be a Ruby programmer.

An In-depth guide updated with the latest version of Qt 5.11 including new features such as Quick Controls and Qt GamepadKey FeaturesUnleash the power of Qt 5.11 with C++Build applications using Qt Widgets (C++) or Qt Quick (QML)Create cross-platform applications for mobile and desktop platforms with Qt 5Book Description

Qt 5.11 is an app development framework that provides a great user experience and develops full capability applications with Qt Widgets, QML, and even Qt 3D. Whether you're building GUI prototypes or fully-fledged cross-platform GUI applications with a native look and feel, Mastering Qt 5 is your fastest, easiest, and most powerful solution. This book addresses various challenges and teaches you to successfully develop cross-platform applications using the Qt framework, with the help of well-organized projects.

Working through this book, you will gain a better understanding of the Qt framework, as well as the tools required to resolve serious issues, such as linking, debugging, and multithreading. You'll start off your journey by discovering the new Qt 5.11 features, soon followed by exploring different platforms and learning to tame them. In addition to this, you'll interact with a gamepad using Qt Gamepad. Each chapter is a logical step for you to complete in order to master Qt.

By the end of this book, you'll have created an application that has been tested and is ready to be shipped.

What you will learnCreate stunning UIs with Qt Widgets and Qt Quick 2Develop powerful, cross-platform applications with the Qt frameworkDesign GUIs with the Qt Designer and build a library in it for UI previewsHandle user interaction with the Qt signal or slot mechanism in C++Prepare a cross-platform project to host a third-party libraryUse the Qt Animation framework to display stunning effectsDeploy mobile apps with Qt and embedded platformsInteract with a gamepad using Qt GamepadWho this book is for

Mastering Qt 5 is for developers and programmers who want to build GUI-based applications. C++ knowledge is necessary, and knowing QT basics will help you get the most out of this book.

Get up and running with all the new features of ECMAScript and explore new ways of coding with JavaScript.Key FeaturesGrasp the latest features of ECMAScript and the best way to use it in production codeLearn newly added native APIs to JS Engine and perform tasks efficiently with a cleaner code baseUnderstand the more complex sides of JavaScript such as the inheritance model, low-level memory management, multithreaded environments, and web workersBook Description

Learn ECMAScript explores implementation of the latest ECMAScript features to add to your developer toolbox, helping you to progress to an advanced level. Learn to add 1 to a variable andsafely access shared memory data within multiple threads to avoid race conditions.

You’ll start the book by building on your existing knowledge of JavaScript, covering performing arithmetic operations, using arrow functions and dealing with closures. Next, you will grasp the most commonly used ECMAScript skills such as reflection, proxies, and classes. Furthermore, you’ll learn modularizing the JS code base, implementing JS on the web and how the modern HTML5 + JS APIs provide power to developers on the web. Finally, you will learn the deeper parts of the language, which include making JavaScript multithreaded with dedicated and shared web workers, memory management, shared memory, and atomics. It doesn’t end here; this book is 100% compatible with ES.Next.

By the end of this book, you'll have fully mastered all the features of ECMAScript!

What you will learnImplement methods associated with objects as per the latest ECMAScript specificationMake use of the latest features of ECMAScriptMake use of many new APIs in HTML5 and modern JavaScript implementationUse SharedArrayBuffers for superfast concurrent and parallel programmingPerform asynchronous programming with JavaScriptImplement the best ways and practices to perform modular programming in JavaScriptWho this book is for

This book is for web developers who have some basic programming knowledge and want to learn to write cleaner code with the power of ECMAScript.

Over 90 recipes that leverage the powerful features of the Standard Library in C++17About This BookLearn the latest features of C++ and how to write better code by using the Standard Library (STL). Reduce the development time for your applications.Understand the scope and power of STL features to deal with real-world problems.Compose your own algorithms without forfeiting the simplicity and elegance of the STL way.Who This Book Is For

This book is for intermediate-to-advanced C++ programmers who want to get the most out of the Standard Template Library of the newest version of C++: C++ 17.

What You Will LearnLearn about the new core language features and the problems they were intended to solveUnderstand the inner workings and requirements of iterators by implementing themExplore algorithms, functional programming style, and lambda expressionsLeverage the rich, portable, fast, and well-tested set of well-designed algorithms provided in the STLWork with strings the STL way instead of handcrafting C-style codeUnderstand standard support classes for concurrency and synchronization, and how to put them to workUse the filesystem library addition available with the C++17 STLIn Detail

C++ has come a long way and is in use in every area of the industry. Fast, efficient, and flexible, it is used to solve many problems. The upcoming version of C++ will see programmers change the way they code. If you want to grasp the practical usefulness of the C++17 STL in order to write smarter, fully portable code, then this book is for you.

Beginning with new language features, this book will help you understand the language's mechanics and library features, and offers insight into how they work. Unlike other books, ours takes an implementation-specific, problem-solution approach that will help you quickly overcome hurdles. You will learn the core STL concepts, such as containers, algorithms, utility classes, lambda expressions, iterators, and more, while working on practical real-world recipes. These recipes will help you get the most from the STL and show you how to program in a better way.

By the end of the book, you will be up to date with the latest C++17 features and save time and effort while solving tasks elegantly using the STL.

Style and approach

This recipe-based guide will show you how to make the best use of C++ together with the STL to squeeze more out of the standard language

Develop real-world applications in WindowsAbout This BookCreate diverse applications featuring the versatility of Small Windows C++ libraryLearn about object-oriented programming in Windows and how to develop a large object-oriented class library in C++Understand how to tackle application-specific problems along with acquiring a deep understanding of the workings of Windows architectureWho This Book Is For

This book is for application developers who want a head-first approach into Windows programming. It will teach you how to develop an object-oriented class library in C++ and enhanced applications in Windows. Basic knowledge of C++ and the object-oriented framework is assumed to get the most out of this book.

What You Will LearnDevelop advanced real-world applications in WindowsDesign and implement a graphical object-oriented class library in C++Get to grips with the workings of the integral aspects of the Win32 API, such as mouse input, drawing, cut-and-paste, file handling, and drop filesIdentify general problems when developing graphical applications as well as specific problems regarding drawing, spreadsheet, and word processing applicationsImplement classes, functions, and macros of the object-oriented class library developed in the book and how we implement its functionality by calling functions and macros in the Win32 APIIn Detail

It is critical that modern developers have the right tools to build practical, user-friendly, and efficient applications in order to compete in today's market. Through hands-on guidance, this book illustrates and demonstrates C++ best practices and the Small Windows object-oriented class library to ease your development of interactive Windows applications.

Begin with a focus on high level application development using Small Windows. Learn how to build four real-world applications which focus on the general problems faced when developing graphical applications. Get essential troubleshooting guidance on drawing, spreadsheet, and word processing applications. Finally finish up with a deep dive into the workings of the Small Windows class library, which will give you all the insights you need to build your own object-oriented class library in C++.

Style and approach

This book takes a tutorial-style approach that will demonstrate the features of a C++ object-oriented library by developing interactive Windows applications.

©2019 GoogleSite Terms of ServicePrivacyDevelopersArtistsAbout Google|Location: United StatesLanguage: English (United States)
By purchasing this item, you are transacting with Google Payments and agreeing to the Google Payments Terms of Service and Privacy Notice.