📄 cpp_stl.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html> <head> <meta name="generator" content="HTML Tidy for Linux/x86 (vers 1st October 2002), see www.w3.org"> <title>C++ Standard Template Library</title> </head> <body bgcolor="#ffffff"> <table width="100%" bgcolor="#eeeeff"> <tr> <td><a href="index.html">cppreference.com</a> -> C++ Standard Template Library</td> </tr> </table> <h3>C++ Standard Template Library</h3> <p>The C++ STL (Standard Template Library) is a generic collection of class templates and algorithms that allow programmers to easily implement standard data structures like <a href="cppqueue.html">queues</a>, <a href="cpplist.html">lists</a>, and <a href="cppstack.html">stacks</a>.</p> <p>The C++ STL provides programmers with the following constructs, grouped into three categories:</p> <ul> <li> Sequences <ul> <li><a href="cppvector.html">C++ Vectors</a></li> <li><a href="cpplist.html">C++ Lists</a></li> <li><a href="cppdeque.html">C++ Double-Ended Queues</a></li> </ul> </li> <li> Container Adapters <ul> <li><a href="cppstack.html">C++ Stacks</a></li> <li><a href="cppqueue.html">C++ Queues</a></li> <li><a href="cpppriorityqueue.html">C++ Priority Queues</a></li> </ul> </li> <li> Associative Containers <ul> <li><a href="cppbitset.html">C++ Bitsets</a></li> <li><a href="cppmap.html">C++ Maps</a></li> <li><a href="cppmultimap.html">C++ Multimaps</a></li> <li><a href="cppset.html">C++ Sets</a></li> <li><a href="cppmultiset.html">C++ Multisets</a></li> </ul> </li> </ul> <p>The idea behind the C++ STL is that the hard part of using complex data structures has already been completed. If a programmer would like to use a stack of integers, all that she has to do is use this code:</p><pre>stack<int> myStack;</pre> <p>With minimal effort, she can now <a href="cppstack_details.html#push">push()</a> and <a href= "cppstack_details.html#pop">pop()</a> integers onto this stack. Through the magic of C++ Templates, she could specify any data type, not just integers. The STL Stack class will provide generic functionality of a stack, regardless of the data in the stack.</p> </body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -