Standard library c++

642 694 0
Standard library c++

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

[...]... dyne-book 12 The C++ Standard Library Chapter 2 Introduction to C++ and the Standard Library 2.1 History The standardization of C++ was started in 1989 and finished at the end of 1997, although some formal motions delayed the final publication until September 1998 The result was a reference manual with approximately 750 pages, published by the International Standards Organization (ISO) The standard has... important new language features that are relevant for the C++ standard library 2.2.1 Templates Almost all parts of the library are written as templates Without template support, you can't use the standard library Moreover, the library needed new special template features, which I introduce after a short overview of templates dyne-book 14 The C++ Standard Library Templates are functions or classes that are... This chapter describes the concept of different memory models in the C++ standard library • An appendix with o Internet Resources o Bibliography o Index 1.4 How to Read this Book This book is a mix of introductory user's guide and structured reference manual regarding the C++ standard library The individual components of the C++ standard library are independent of each other, to some extent, so after reading... the C++ standard library was introduced during the standardization process This change is not backward compatible to old header files, in which identifiers of the C++ standard library are declared in the global scope In addition, some interfaces of classes changed during the standardization process (however, the goal was to stay backward compatible if possible) So, a new style for the names of standard. .. defines the exact contents and behavior of C++, it makes it easier to teach C++, to use C++ in applications, and to port C++ programs to different platforms It also gives users greater freedom of choice regarding different C++ implementations Its stability and portability help library providers and tool providers as well as implementers Thus, the standard helps C++ application developers build better... Note that some dyne-book 24 The C++ Standard Library compilers might print a warning message regarding this or even handle it as error Well, that's life before the standard 2.3 Complexity and the Big-O Notation For certain parts of the C++ standard library (especially for the STL), the performance of algorithms and member functions was considered carefully Thus, the standard requires a certain "complexity"... the standard in five years or so However for the next few years, C++ programmers have a standard and the chance to write powerful code that is portable to very different platforms 2.2 New Language Features The core language and the library of C++ were standardized in parallel In this way, the library could benefit from improvements in the language and the language could benefit from experiences of library. .. root of several standard exception classes that form a hierarchy, as shown in Figure 3.1 These standard exception classes can be divided into three groups: Figure 3.1 Hierarchy of Standard Exceptions dyne-book 29 The C++ Standard Library 1 Exceptions for language support 2 Exceptions for the C++ standard library 3 Exceptions for errors outside the scope of a program Exception Classes for Language Support... Exception Classes for the Standard Library Exception classes for the C++ standard library are usually derived from class logic_error Logic errors are errors that, at least in theory, could be avoided by the program; for example, by performing additional tests of function arguments Examples of such errors are a violation of logical preconditions or a class invariant The C++ standard library provides the... avoidable The C++ standard library provides the following classes for runtime errors: • • • An exception of class range_error is used to report a range error in internal computations An exception of class overflow_error is used to report an arithmetic overflow An exception of class underflow_error is used to report an arithmetic underflow Exceptions Thrown by the Standard Library The C++ standard library . +49 5309 5774 Many thanks. The C++ Standard Library dyne-book 13 Chapter 2. Introduction to C++ and the Standard Library 2.1 History The standardization of C++ was started in 1989 and finished. Chapter 2: Introduction to C++ and the Standard Library This chapter provides a brief overview of the history of the C++ standard library and the context of its standardization. It also contains. for the C++ standard library. 2.2.1 Templates Almost all parts of the library are written as templates. Without template support, you can't use the standard library. Moreover, the library

Ngày đăng: 27/03/2014, 12:51

Từ khóa liên quan

Mục lục

  • Cover

  • Introduction

  • Table of Contents

  • Preface

  • Acknowledgements

  • Chapter 1.About this book

    • 1.1 Why this Book

    • 1.2 What You Should Know Before Reading this Book

    • 1.3 Style and Structure of the Book

    • 1.4 How to Read this Book

    • 1.5 State of the Art

    • 1.6 Example Code and Additional Information

    • 1.7 Feedback

    • Chapter 2.Introduction to C++ and the Standard Library

      • 2.1 History

      • 2.2 New Language Features

      • 2.3 Complexity and the Big-O Notation

      • Chapter 3.General Concepts

        • 3.1 Namespace std

        • Chapter 4.Utilities

        • Chapter 5.The Standard Template Library

        • Chapter 6.STL Containers

        • Chapter 7.STL Iterators

Tài liệu cùng người dùng

Tài liệu liên quan