Serrurier Marseille E-books > Programming > Using the C++ Standard Template Libraries by Ivor Horton PDF

Using the C++ Standard Template Libraries by Ivor Horton PDF

By Ivor Horton

ISBN-10: 1484200055

ISBN-13: 9781484200056

Starting STL is a latest therapy that teaches you the newest C++ 14 APIs, libraries and extensions and the way to use those on your C++ 14 purposes. during this e-book, writer Ivor Horton explains what the STL is and the way to exploit it together with your C++ functions. You'll how you can use bins and iterators, in addition to how to find, create and follow algorithms. additionally, you'll know about functionality items and allocators and the way to take advantage of them.

After examining this publication, you'll the right way to expand the STL and outline your personal sorts of C++ elements. You'll even be in a position to outline your personal kinds to meet the C++ STL standards and to comply to the most typical layout styles and top practices.

The usual Template Library presents you as a C++ programmer with a finished set of successfully carried out instruments and reusable parts so you might use for many forms of software.

Show description

Read Online or Download Using the C++ Standard Template Libraries PDF

Best programming books

C++ Neural Networks and Fuzzy Logic by Valluru B. Rao, Hayagriva Rao PDF

The greatly revised and up-to-date variation offers a logical and easy-to-follow development via C++ programming for 2 of the preferred applied sciences for man made intelligence--neural and fuzzy programming. The authors disguise conception in addition to functional examples, giving programmers a great origin in addition to operating examples with reusable code.

Read e-book online Using the C++ Standard Template Libraries PDF

Starting STL is a latest therapy that teaches you the most recent C++ 14 APIs, libraries and extensions and the way to use those in your C++ 14 functions. during this ebook, writer Ivor Horton explains what the STL is and the way to take advantage of it along with your C++ purposes. You'll how you can use bins and iterators, in addition to how to find, create and practice algorithms.

New PDF release: Practical Standards for Microsoft Visual Basic.NET

Readers research most sensible practices for object-oriented programming, dossier operations, answer distribution, and extra - with code samples and recommendation on utilizing criteria to their very own tasks.

Additional info for Using the C++ Standard Template Libraries

Sample text

33 Chapter 2 ■ Using Sequence Containers • A forward_list is a variable length sequence of objects of type T organized as a singly linked list. This is faster and requires less memory than a list container, but elements interior to the sequence can only be accessed starting from the first element. Figure 2-1 illustrates the sequence containers that are available and the differences between them. Figure 2-1. The standard sequence containers 34 Chapter 2 ■ Using Sequence Containers The operations shown for each type of container in Figure 2-1 are those that can be carried out efficiently.

Calling reset() for a unique_ptr object with no argument destroys the object that is pointed to and replaces the raw pointer in the unique_ptr object with nullptr; this enables you to destroy the object that is pointed to at any time. For example: auto pname = std::make_unique("Algernon"); ... reset(new std::string{"Fred"}); This releases the memory for the original string that was pointed to by pname, creates a new string object "Fred" in the free store, and stores its address in pname.

The global inserter() function returns an insert_iterator object for the container specified as the first argument; the second argument is an iterator that points to the position in the container where elements are to be inserted. The insert iterators are generally used as arguments to algorithms that copy elements from a specified range or algorithms that generate new elements. You will see them applied in the next chapter. Move Iterators A move iterator is created from a regular iterator that points to an element in a range.

Download PDF sample

Using the C++ Standard Template Libraries by Ivor Horton


by David
4.5

Rated 4.69 of 5 – based on 30 votes