Skip to main content

First post using stackedit

Welcome to StackEdit! Hey! I’m your first Markdown document in StackEdit 1 . Don’t delete me, I’m very helpful! I can be recovered anyway in the Utils tab of the Settings dialog. Documents StackEdit stores your documents in your browser, which means all your documents are automatically saved locally and are accessible offline! Note: StackEdit is accessible offline after the application has been loaded for the first time. Your local documents are not shared between different browsers or computers. Clearing your browser’s data may delete all your local documents! Make sure your documents are synchronized with Google Drive or Dropbox (check out the Synchronization section). Create a document The document panel is accessible using the button in the navigation bar. You can create a new document by clicking New document in the document panel. Switch to another document All your local documents are listed in the document panel. You can switch from one to anoth...

Effective STL: 50 Specific Ways to Improve Your Use of the Standard Template Library, 2001



Book Description

“This is Effective C++ volume three – it’s really that good.”
– Herb Sutter, independent consultant and secretary of the ISO/ANSI C++ standards committee
“There are very few books which all C++ programmers must have. Add Effective STL to that list.”
– Thomas Becker, Senior Software Engineer, Zephyr Associates, Inc., and columnist, C/C++ Users Journal
C++’s Standard Template Library is revolutionary, but learning to use it well has always been a challenge. Until now. In this book, best-selling author Scott Meyers (Effective C++, and More Effective C++) reveals the critical rules of thumb employed by the experts – the things they almost always do or almost always avoid doing – to get the most out of the library.
Other books describe what’s in the STL. Effective STL shows you how to use it. Each of the book’s 50 guidelines is backed by Meyers’ legendary analysis and incisive examples, so you’ll learn not only what to do, but also when to do it – and why.
Highlights of Effective STL include:
  • Advice on choosing among standard STL containers (like vector and list), nonstandard STL containers (like hash_set and hash_map), and non-STL containers (like bitset).
  • Techniques to maximize the efficiency of the STL and the programs that use it.
  • Insights into the behavior of iterators, function objects, and allocators, including things you should not do.
  • Guidance for the proper use of algorithms and member functions whose names are the same (e.g., find), but whose actions differ in subtle (but important) ways.
  • Discussions of potential portability problems, including straightforward ways to avoid them.
Like Meyers’ previous books, Effective STL is filled with proven wisdom that comes only from experience. Its clear, concise, penetrating style makes it.

Editorial Reviews

Amazon.com Review

Written for the intermediate or advanced C++ programmer, renowned C++ expert Scott Meyers provides essential techniques for getting more out of the Standard Template Library in Effective STL, a tutorial for doing more with this powerful library. STL is a hugely powerful feature of today's C++, but one with a well-earned reputation for complexity. The book is organized into 50 tips that explore different areas of the STL. Besides providing a list of dos and don'ts, Meyers presents a lot of background on what works and what doesn't with STL. Each tip is demonstrated with in-depth coding samples, many of which make use of two-color printing to highlight the most important lines of code. (Advanced developers will enjoy Meyers's in-depth explanations, while those who are in a hurry can skip ahead to the recommended tip itself.)
A good part of this book involves using containers, like vectors and maps, which are built into STL. (Besides the standard built-in containers, the author also highlights recent additions to STL like B-trees, which are available as extensions from other vendors.) You'll learn the best ways to allocate, add, change, and delete items inside containers, including associative containers like maps. You'll also learn to avoid common pitfalls, which can result in writing code that is slow or just plain wrong.
Other areas covered in Effective STL cover getting the most out of the 100-plus STL algorithms that are bundled with this library. Meyers shows you how to choose the correct algorithm for sorting and other functions. (Even advanced developers will learn something here.) Sections on using function objects (called functors) round out the text. Meyers shows you when these classes make sense and the best ways to implement them. Besides specific tips, you'll get plenty of general programming advice. A useful appendix shows the limitations of STL as implemented in Microsoft Visual C++ 6.0 and how to overcome them.
Overall, Effective STL is a really invaluable source of programming expertise on an essential aspect of today's C++ for anyone who is using--or planning to use--STL in real production code. It is quite simply a must-have. --Richard Dragan
Topics covered:
  • Introduction to advanced Standard Template Library (STL) programming techniques
  • 50 tips and best practices for STL illustrated with sample tutorial code
  • Choosing containers
  • Efficient copying of elements inside containers
  • Removing, erasing, and cleaning up items from containers
  • Using custom allocators with STL containers
  • Thread safety with STL
  • Tips for programming with the STL vector and string classes (including reserving memory and calling legacy C/C++ code)
  • Tips for associative containers (including comparing items, sorted vectors, and non-standard enhancements to STL)
  • Tips for selecting and using STL iterator classes
  • STL algorithms (including sorting, removing, and comparing items)
  • Using functors with STL
  • General tips for STL programming (including advice for choosing algorithms and understanding compiler diagnostic messages)
  • String locales
  • Overcoming STL imitations in Microsoft Visual C++ 6.0

From the Back Cover

"This is Effective C++ volume three--it's really that good." --Herb Sutter, independent consultant and secretary of the ISO/ANSI C++ standards committee "There are very few books which all C++ programmers must have. Add Effective STL to that list." --Thomas Becker, Senior Software Engineer, Zephyr Associates, Inc., and columnist, C/C++ Users Journal C++'s Standard Template Library is revolutionary, but learning to use it well has always been a challenge. Until now.
Other books describe what's in the STL. Effective STL shows you how to use it. Each of the book's 50 guidelines is backed by Meyers' legendary analysis and incisive examples, so you'll learn not only what to do, but also when to do it--and why.
Highlights of Effective STL include:

  • Advice on choosing among standard STL containers (like vector and list), nonstandard STL containers (like hash_set and hash_map), and non-STL containers (like bitset).
  • Techniques to maximize the efficiency of the STL and the programs that use it.
  • Insights into the behavior of iterators, function objects, and allocators, including things you should not do.
  • Guidance for the proper use of algorithms and member functions whose names are the same (e.g., find), but whose actions differ in subtle (but important) ways.
  • Discussions of potential portability problems, including straightforward ways to avoid them. Like Meyers' previous books, Effective STL is filled with proven wisdom that comes only from experience. Its clear, concise, penetrating style makes it an essential resource for every STL programmer.


  • Product Details

    • Paperback: 288 pages
    • Publisher: Addison-Wesley Professional; 1 edition (June 16, 2001)
    • Language: English
    • ISBN-10: 0201749629
    • ISBN-13: 978-0201749625
    • Product Dimensions: 9.1 x 7.3 x 0.7 inches
    • Shipping Weight: 1.3 pounds


    Download link: http://adf.ly/407wA
    Password: bloglangthang.tk

    Comments

    Popular posts from this blog

    Cài đặt Apache, PHP và MySQL trong Ubuntu 8.10

    Cài đặt bộ 3 thành phần này trong Ubuntu dễ hơn rất nhiều so với trong Windows, tất cả bạn cần làm là có một đường truyền Internet tương đối tốt. Đầu tiên, cài đặt Apache: Mở Terminal lên và gõ: sudo apt-get install apache2 Có thể bạn sẽ phải nhập mật khẩu root, sau đó quá trình cài đặt sẽ diễn ra tự động, bạn chỉ phải ngồi chờ, và chọn Y nếu có câu hỏi. Để kiểm tra Apache đã cài đặt thành công hay chưa, hãy mở trình duyệt lên và gõ: http://localhost/ Nếu bạn thấy dòng chữ It works thì mọi việc đã suôn sẻ. Tiếp theo là quá trình cài đặt PHP. Vẫn trong cửa sổ Terminal, gõ: sudo apt-get install php5 libapache2-mod-php5 Quá trình cài đặt diễn ra tương tự như cài đặt Apache, lưu ý ở đây là câu lệnh cài đặt PHP 5. Quá trình cài đặt sẽ tắt mất Apache, bạn cần khởi động lại nó để chạy thử PHP - tất nhiên có thể để sau cũng được: sudo /etc/init.d/apache2 restart Để kiểm tra PHP cài đặt có thành công hay không, hãy tạo file test.php trong thư mục /var/www có nội dung: Sau đó, mở trình duyệt lê...

    Getting started with Cryptpad in Ubuntu: step by step

    Cryptpad is an open source collaborative editor which is hosted at: https://github.com/cjdelisle/cryptpad It is easy to clone the github repository and start to try, but if you are a newbie, there maybe some difficulties. Suppose that you have a clean Ubuntu machine, and want to try with Cryptpad, you can follow these steps: 1. Download mongodb for Linux: https://www.mongodb.org/downloads 2. Unzip the file you got to a location you want. You will start mongodb from there, or add this directory to your PATH variable so you can start mongodb from anywhere. 3. Suppose that you chose the easier way, i.e start mongodb from its directory. 4. Open Terminal (Ctrl + Alt + T for shortcut), move to the directory of mongodb 5. Type: mkdir db mongod --dbpath=./db These above commands will first, create a directory 'db' insider the directory mongodb, then start mongodb server. 6. Keep the terminal with mongodb server running 7. Open another terminal (Ctrl...

    thơ 19 & 20

    thơ 19 có một bài thơ thích nói chuyện sâu xa, ví như triết học. Nó than phiền về việc người ta cứ lẫn lộn hết cả giữa tôn giáo với ý nghĩ giả dối của mấy ông lãnh tụ (hồi xưa) & mấy ông lãnh chúa (bây giờ) và triết học. Nó than phiền về sự nhàm chán của chính trị đang làm loạn trong triết học, là thứ khoa học của mọi khoa học mà nó đang yêu mến nó (bài thơ) hay nhắc tới các các “trào lưu”, “chủ thuyết” hấp dẫn mơ hồ và xa tít tận đâu đâu... hình như là ở tận các nước Đức, Pháp... Nó phát âm và đọc tên các tác giả ấy rất rõ ràng, hình như cũng bằng tiếng Đức, tiếng Pháp... (vì người ta nghe ác ác eng eng nên đoán thế, chứ cũng không ai biết tiếng Đức hay tiếng Pháp). Người ta thấy nó như vậy nên cho nó đi nghiên cứu ở các nước Đức, Pháp... với hy vọng ngày về, nó (bài thơ) sẽ giảng triết học cho mà nghe. Chắc là hay lắm thời gian sau nó về (cũng hơi hơi lâu). Sáng hôm đó mọi người tập trung nghe nó giảng chuyện ở Đức thì nó kể về bia đen và xúc xích. Sau khi nghe xong c...