Skip to content

Download C++ Recipes: A Problem-Solution Approach by Bruce Sutherland PDF

By Bruce Sutherland

C++ Recipes: A Problem-Solution Approach is a convenient code cookbook reference consultant that conceal the newest C++ 14 in addition to a number of the code templates to be had within the newest common Template Library (STL).

In this useful reference, you will find numbers, strings, dates, instances, periods, exceptions, streams, flows, tips and extra. additionally, you will see a number of code samples, templates for C++ algorithms, parallel processing, multithreading and numerical approaches. those have many functions together with online game improvement, gigantic info analytics, monetary engineering and research, firm purposes and extra. A wealth of STL templates on functionality gadgets, adapters, allocators, and extensions also are on hand.

This is a "must have", modern reference to your technical library.

Show description

Read or Download C++ Recipes: A Problem-Solution Approach PDF

Similar object-oriented software design books

Business Objects: The Complete Reference

In the event that your target in enterprise intelligence reporting is enterprise gadgets good fortune, this is often the source for you. provides a radical run-down of the software program, plus assurance of internet intelligence, advanced queries, multidimensional research, and extra. writer Cindi Howson has lots of hands-on adventure with the product.

Pattern-oriented software architecture. Vol. 5, On patterns and pattern languages

Software program styles have revolutionized the best way builders take into consideration how software program is designed, outfitted, and documented, and this exact booklet deals an in-depth glance of what styles are, what they don't seem to be, and the way to exploit them effectively the one booklet to try to strengthen a entire language that integrates styles from key literature, it additionally serves as a reference handbook for all pattern-oriented software program structure (POSA) styles Addresses the query of what a development language is and compares a variety of trend paradigms builders and programmers working in an object-oriented setting will locate this publication to be a useful source

Software Engineering: A Hands-On Approach

This textbook presents a innovative method of the educating of software program engineering. First, readers are brought to the middle strategies of the object-oriented technique, that's used through the e-book to behave because the origin for software program engineering and programming practices, and partially for the software program engineering approach itself.

Using UML : software engineering with objects and components

Up-to-date for UML 1. four, this ebook is an advent to the Unified Modeling Language for college kids studying approximately item- and component-based software program layout and improvement. The objective of the publication is to inspire a practical and open-minded method of real-life software program engineering. It areas UML within the context of the software program engineering self-discipline as an entire, supplying scholars with a pragmatic realizing of excellent perform in software program layout and improvement.

Additional resources for C++ Recipes: A Problem-Solution Approach

Example text

These literals can all be applied to an integer literal to inform the compiler that you would like to create a literal of a duration object with the given type of time. Applying s to a character literal such as "A String"s tells the compiler to create a literal of type std::string. These literals are defined in the std::literals namespace and are a C++14 only feature, meaning that they cannot be used in C++11 or C++98 code. Figure 2-7 shows the output generated when this program is run. Figure 2-7.

Endl; } const string& GetName() const { return m_Name; } int GetValue() const { return m_Value; } }; 53 Chapter 2 ■ Modern C++ using MyUniquePtr = unique_ptr; auto PassUniquePtr(MyUniquePtr ptr) { cout << "In Function Name: " << ptr->GetName() << endl; return ptr; } int main() { auto uniquePointer = make_unique("MyClass", 10); auto newUniquePointer = PassUniquePtr(move(uniquePointer)); if (uniquePointer) { cout << "First Object Name: " << uniquePointer->GetName() << endl; } cout << "Second Object Name: " << newUniquePointer->GetName() << endl; return 0; } The code in Listing 2-34 moves a unique_ptr instance into a function.

This means that you are free to cannibalize the object so that you can implement a copy operation faster than if the pre-existing state was needed to be preserved. Listing 2-30 shows how to add a move constructor to MyClass. Listing 2-30. m_Member = nullptr; } int GetValue() const { return *m_Member; } }; int MyClass::s_Counter{ 0 }; MyClass CopyMyClass(MyClass parameter) { return parameter; } int main() { auto object1 = MyClass(); { auto object2 = MyClass(); } auto object3 = MyClass(); auto object4 = CopyMyClass(object3); return 0; } 47 Chapter 2 ■ Modern C++ The code in Listing 2-30 adds a move constructor to MyClass.

Download PDF sample

Rated 4.75 of 5 – based on 44 votes