网管联盟-网管软件下载-搞乐乐网站全力打造网管之家

当前位置: 网管>编程开发>C++>

标准模板库STL(Standard Template Library)(18)

时间:2009-04-07 16:36来源:未知 作者:admin 点击:
6 版权信息 STL可以自由的使用,只需要加上HP的版权说明即可: /* * * Copyright (c) 1994 * Hewlett-Packard Company * * Permission to use, copy, modify, distribute and sell this * software and its documen
6 版权信息
STL可以自由的使用,只需要加上HP的版权说明即可:
 /*
 *
 * Copyright (c) 1994
 * Hewlett-Packard Company
 *
 * Permission to use, copy, modify, distribute and sell this
 * software and its documentation for any purpose is hereby
 * granted without fee, provided that the above copyright notice
 * appear in all copies and that both that copyright notice and
 * this permission notice appear in supporting documentation.
 * Hewlett-Packard Company makes no representations about the
 * suitability of this software for any purpose. It is provided
 * "as is" without express or implied warranty.
 */
看微软的STL实现头文件,比如#include <vector>中,都有以上的版权提示。
7 文献
[1] Stroustrup, BjarneThe C++ Programming Language – 2nd ed.
       June, 1993
[2]   Stepanov, AlexLee, MengThe Standard Template Library
       HP Labaratories, 1501 Page Mill Road, Palo Alto, CA 94304
October 31, 1995
[3]   STL++
       The Enhanced Standard Template Library, Tutorial & Reference Manual
       Modena Software Inc., 236 N. Santa Cruz Ave, Suite 213, Los Gatos CA 95030
       1994
[4]   Standard Template Library Reference
       Rensselaer Polytechnic Institute, 1994
       includes as chapter 6
       The STL Online Algorithm Reference
       Cook, Robert Jr.Musser, David R.Zalewski, Kenneth J.
       online at http://www.cs.rpi.edu/~musser/stl.html
[5]   附件一
The Standard Template Library Tutorial, Johannes Weidl, 1996-04-26

[6]   附件二
       The Standard Template Libray以及源代码, Alexander Stepanov & Meng Lee, 1995-10-31

8 后话
本文我基本上是翻译Johannes Weidl的<<The Standard Template Library Tutorial>>一书,当然有节选,如果你想深入了解STL,那么这本书(共56页)是个不错的开始。其中的大部分例子我都试过。
 
从网上看到的消息:VC++ 4.2中就号称有STL的支持了,但有很多错误;到VC++5.0就可以了。我在4.2上试过确实不行,然后就直接安装VC6.0使用STL了。
在MSDN Libray (April 1999)中有STL的详细文档说明以及118个STL的例子,可以帮助你理解和使用STL库。(MSDN安装盘的位置在748-domain中,\Soft_libraryMSDN1Library199904Setup,注意安装时选择“VC++ Document”,STL文档就在其中。
       实际上STL中有的功能在MFC中都有替代品。例如在MFC中有CArray等。不过,在你只能使用标准C/C++如在Unix或Linux环境下要使用这些数据结构,使用STL是一个很好的选择。STL最大的特点是它使用的算法非常可靠且效率很高,例如其中的二叉树算法就很经典。不过看 STL源代码还是有点困难的,需要下点功夫。不过如果只是要使用可以不看源代码,使用起来很简单的。(责任编辑:admin)
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
验证码:点击我更换图片
栏目列表
推荐内容