Download Designing components with the C++ STL by Ulrich Breymann PDF

By Ulrich Breymann

'This booklet is the main actual and updated resource of data at the STL at the moment available...It has an technique and charm of its personal: it explains concepts for construction facts constructions and algorithms on most sensible of the STL, and during this method appreciates the STL for what it truly is - a framework.' - Angelika Langer, self reliant advisor and C++ record Columnist"A beautifully authored therapy of the very good ebook which belongs in any critical C++ developer's library. - Jim Armstrong, President 2112 F/X, Texas.The C++ general Template Library (STL) represents a step forward in C++ programming innovations. With it, software program builders can in achieving substantial advancements within the reliability in their software program, and bring up their very own productiveness. Designing parts with the C++ STL has 3 goals: to introduce the reader to the STL to teach how this strong source will be exploited to increase its use to the development of latest components.This revised variation is totally compliant with the recent ISO/IEC C++ usual with an linked website containing quite a few, totally updated examples for downloading.The writer indicates tips on how to make functional use of the STL via a wealth of examples a special perception into the internals of the STL takes the reader past easily utilizing it, to teach how the elements provided within the STL can be utilized to layout extra advanced info constructions and algorithms, and strong summary info kinds. all through, the writer continues a chic and complicated coding sort, adhering faithfully to the present ISO/ANSI criteria, aiding to make sure that your software program could be much more transportable, maintainable and reusable than ever.

Show description

Read or Download Designing components with the C++ STL PDF

Best programming: programming languages books

Effektiv Starten mit Turbo C++: Professionelle Programmierung von Anfang an

Oberall ist die Rede von . C. . bruner hiufiger wird der Wunsch, ohne Kennt nisse anderer Programmiersprachen in 'C' einsteigen zu konnen. Genau dies ist die Zielsetzung des vorliegenden Buches. Ausgehend von ganz einfachen Beispielen wird der Leser Schritt fiir Schritt mit allen Moglichkeiten von 'C' und dem Nachfolger 'C++' vertraut gemacht, ohne daB dafiir Vorkenntnisse in anderen Programmiersprachen notig sind.

Objektorientiertes Programmieren: Mit Beispielen und Übungen in C++

"OOP" ist "in". Die modernste paintings, Programme zu schreiben, wird in diesem didaktisch vorz}glich aufbereiteten Lehrbuch vermittelt. Das Schwergewicht der Darstellung liegt auf der methodischen Darstellung der Gurndlagen und Konzepte pbjektorientierten Programmierens: Objekte, Klassen, Vererbung,Instanzen, Botschaften und abstrakte Datentypen werden verdeutlicht.

Additional info for Designing components with the C++ STL

Example text

The functors returned by the functions bind1st() and bind2nd() are of the type binder1st and SOME CONVENTIONS 27 binder2nd . In an application such as the one above, the types usually do not appear explicitly (class definition in header ). ptr_fun This overloaded function transforms a pointer to a function into a functor. As an argument, it has a pointer to the function which can have one or two parameters. The function returns a function object which can be called in the same way as the function.

The STL contains three kinds of sequential containers, namely vector, list, and deque. A list (list) should be used when frequent insertions and deletions are needed somewhere in the middle. A queue with two ends (deque = double ended queue) is reasonable when insertion and deletion frequently take place at either end. vector corresponds to an array. deque and vector allow random access to elements. The above-mentioned operations together with their containers need only constant time. Other operations, however, such as insertion of an element into the middle of a vector or a queue, are more expensive; the average cost increases linearly with the number of already existing elements.

Ignoring the constant factor allows for comparing algorithms. Definition: Let f (n) be the execution time of an algorithm. This algorithm is of (time) complexity O(g(n)) if and only if two positive constants c and n0 exist so that f (n) ≤ cg(n) applies to all n ≥ n0 . Example Let us assume an algorithm for vectors whose execution time f (n) depends on the length n of the vector. 1: Algorithms and frequency. applies. 1n2 . If we now compare f (n) with g(n), we see that g(n) > f (n) for all n ≥ 66.

Download PDF sample

Rated 4.63 of 5 – based on 12 votes