TAILIEUCHUNG - A Complete Guide to Programming in C++ part 78

A Complete Guide to Programming in C++ part 78. This book provides both novice and experienced programmers with a comprehensive resource manual for the C++ programming language. Readers gain experience in all aspects of programming, from elementary language concepts to professional software development, with in depth coverage of all the language elements en route. These elements are carefully ordered to help the reader create useful programs every step of the way. | chapter 33 Containers This chapter describes standard class templates used to represent containers for more efficient management of object include sequences such as lists and double ended queues container adapters such as stacks queues and priority queues associative containers such as sets and maps and bitsets. Besides discussing how to manage containers we will also be looking at sample applications such as bitmaps for raster images and routing techniques. 749 750 CHAPTER 33 CONTAINERS CONTAINER TYPES Sequences and associative containers Containers Sequences Associative Containers Arrays Stacks Queues Sets Maps Bitsets etc. CONTAINER TYPES 751 What is a Container Containers are used to store objects of the same type and provide operations with which these objects can be managed. These operations include object insertion deletion and retrieval. Memory is allocated for containers dynamically at runtime. Containers thus provide a safe and easy way to manage collections of objects. The C standard library provides various class templates for container management in the Containers Library. These classes can be categorized as follows sequential containers or sequences where the objects are arranged sequentially and access to an object can either be direct or sequential associative containers where the objects are generally organized and managed in a tree structure and can be referenced using keys. Sequences Sequential containers are distinguished by the operations defined for them which are either generic or restricted. Restricted operations such as appending at the end of a container have constant runtimes. That is the runtime is proportional to a fixed period of time and does not depend on the number of objects in the container. The following are sequential containers arrays which provide the same operations as C arrays but increase and decrease in size dynamically in contrast to C arrays queues which are managed on the FIFO First In First Out .

TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
8    164    3    28-12-2024
28    160    1    28-12-2024
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.