Using the C++ Standard Template Libraries (Paperback)

Ivor Horton

  • 出版商: Apress
  • 出版日期: 2015-09-29
  • 售價: $2,130
  • 貴賓價: 9.5$2,024
  • 語言: 英文
  • 頁數: 520
  • 裝訂: Paperback
  • ISBN: 1484200055
  • ISBN-13: 9781484200056
  • 相關分類: C++ 程式語言
  • 相關翻譯: C++ 標準模板庫編程實戰 (簡中版)
  • 海外代購書籍(需單獨結帳)

買這商品的人也買了...

商品描述

Using the C++ Standard Template Libraries is a contemporary treatment that teaches the generic programming capabilities that the C++ 14 Standard Library provides. In this book, author Ivor Horton explains what the class and function templates available with C++ 14 do, and how to use them in a practical context.

You'll learn how to create containers, and how iterators are used with them to access, modify, and extend the data elements they contain. You'll also learn about stream iterators that can transfer data between containers and streams, including file streams. The function templates that define algorithms are explained in detail, and you'll learn how to pass function objects or lambda expressions to them to customize their behavior. Many working examples are included to demonstrate how to apply the algorithms with different types of containers.

After reading this book, you will understand the scope and power of the templates that the C++ 14 Standard Library includes and how these can greatly reduce the coding and development time for many applications. You'll be able to combine the class and function templates to great effect in dealing with real-world problems.

The templates in the Standard Library provide you as a C++ programmer with a comprehensive set of efficiently implemented generic programming tools that you can use for most types of application.


  • How to use Standard Library templates with your C++ applications.<
  • Understand the different types of containers that are available and what they are used for.
  • How to define your own class types to meet the requirements of use with containers.
  • What iterators are, the characteristics of the various types of iterators, and how they allow algorithms to be applied to the data in different types of container.
  • How you can define your own iterator types.
  • What the templates that define algorithms do, and how you apply them to data stored in containers and arrays.
  • How to access hardware clocks and use them for timing execution.
  • How to use the templates available for compute-intensive numerical data processing.
  • How to create and use pseudo-random number generators with distribution objects.
  • 商品描述(中文翻譯)

    《使用 C++ 標準模板庫》是一本現代化的教材,介紹了 C++ 14 標準庫所提供的通用程式設計能力。在這本書中,作者 Ivor Horton 解釋了 C++ 14 中可用的類別和函式模板的功能,以及如何在實際情境中使用它們。

    您將學習如何建立容器,以及如何使用迭代器來存取、修改和擴充它們所包含的資料元素。您還將學習有關流迭代器的知識,它們可以在容器和流之間傳輸資料,包括檔案流。書中詳細解釋了定義演算法的函式模板,並且您將學習如何將函式物件或 lambda 表達式傳遞給它們以自訂其行為。書中包含了許多實例,以示範如何將演算法應用於不同類型的容器。

    閱讀完本書後,您將了解 C++ 14 標準庫所包含的模板的範圍和功能,以及這些模板如何大大減少許多應用程式的編碼和開發時間。您將能夠在處理實際問題時,巧妙地結合類別和函式模板。

    標準庫中的模板為 C++ 程式設計師提供了一套全面且高效實現的通用程式設計工具,可用於大多數應用類型。

    本書將教您:
    - 如何在您的 C++ 應用程式中使用標準庫模板。
    - 了解可用的不同類型容器及其用途。
    - 如何定義符合容器使用需求的自訂類型。
    - 迭代器是什麼,各種迭代器的特性,以及它們如何允許將演算法應用於不同類型的資料容器。
    - 如何定義自己的迭代器類型。
    - 定義演算法的模板的功能,以及如何將其應用於存儲在容器和陣列中的資料。
    - 如何存取硬體時鐘並使用它們來計時執行時間。
    - 如何使用適用於計算密集型數據處理的可用模板。
    - 如何創建和使用具有分佈物件的偽隨機數生成器。