tailieunhanh - Lập trình hướng đối tượng - Chương 6

Tài liệu tham khảo giáo trình Lập trình hướng đối tượng - Chương 6 : santard templates library | Chương 6 Standard Template Library Lập trình hướng đối tượng - STL The Standard Template Library Origins of STL Generic programming STL components STL installation STL header files STL incompatibilities Lập trình hướng đối tượng - STL The Standard Template Library The Standard Template Library (STL) is a general-purpose library of container classes (such as vectors, lists, sets and maps) and generic algorithms (such as searching, sorting and merging). The chief difference between STL and other C++ libraries is that STL containers and algorithms can be "plugged" together in a myriad of different useful ways. Lập trình hướng đối tượng - STL Problems with libraries Writing your own library of container classes can be very frustrating because, even if you are familiar with the best techniques, there is rarely time to implement them. Buying a commercial library also has its drawbacks: Incompatibility Inefficiency Unwieldy interfaces Lập trình hướng đối tượng - STL Origins of STL In view of these problems, the ANSI committee for C++ standardisation sought a standard set of container classes. Alexander Stepanov and Meng Lee of Hewlett Packard Laboratories proposed STL, and in 1994 it was accepted as part of the C++ Standard Library. Lập trình hướng đối tượng - STL Why STL? STL was chosen as the ANSI standard for several reasons: Efficiency Iterators Generic algorithms Function objects Allocators Lập trình hướng đối tượng - STL Generic programming Research into generic programming has aimed to produce libraries of generic, or reusable, software components. Lập trình hướng đối tượng - STL Generic programming Each iterator defines the operations that are needed to access the contents of a particular type of container. Class templates are used to define containers and iterators, and function templates are used to define generic algorithms. Lập trình hướng đối tượng - STL Generic programming Not every generic algorithm and iterator can be | Chương 6 Standard Template Library Lập trình hướng đối tượng - STL The Standard Template Library Origins of STL Generic programming STL components STL installation STL header files STL incompatibilities Lập trình hướng đối tượng - STL The Standard Template Library The Standard Template Library (STL) is a general-purpose library of container classes (such as vectors, lists, sets and maps) and generic algorithms (such as searching, sorting and merging). The chief difference between STL and other C++ libraries is that STL containers and algorithms can be "plugged" together in a myriad of different useful ways. Lập trình hướng đối tượng - STL Problems with libraries Writing your own library of container classes can be very frustrating because, even if you are familiar with the best techniques, there is rarely time to implement them. Buying a commercial library also has its drawbacks: Incompatibility Inefficiency Unwieldy interfaces Lập trình hướng đối tượng - STL Origins

TỪ KHÓA LIÊN QUAN