STL learning and C++ program
文章平均质量分 70
purplethunder
wu
展开
-
1: note of learning stl c++
Code reuse is the STLS soul------------------my first expression to stl .May be it just a foos think.my first program ::the list opration of insert ,remove : :element is struct node :First remember原创 2006-02-18 23:49:00 · 814 阅读 · 0 评论 -
标准模板库(STL)介绍(下)
作者: winter 作者:Scott Field 。 本文以STL容器list为例,介绍了find()函数、sort()函数,search()函数,splice()函数等,由浅入深,把list的用法和相关通用函数的用法做了详细介绍。 使用STL通用算法find()在list中查找对象 我们如何在list中查找东西呢?STL的通用算法find()和find_if()可以做转载 2006-02-25 06:03:00 · 1691 阅读 · 0 评论 -
vector stl c++
1:vector的访问方式 vector类似于数组,可以使用下标[]访问: vector v(10); v[0] = 101;-- @page { size: 21cm 29.7cm; margin: 2cm } P { margin-bottom: 0.21cm } --> b:用原创 2006-02-25 06:46:00 · 1443 阅读 · 0 评论 -
Feb 25 2006 sat ::reading the introduce of the stl
1:C++构造函数的初始化方法: <!-- @page { size: 21cm 29.7cm; margin: 2cm } P { margin-bottom: 0.21cm } --> 缺省构造函数(default constructor) shape() : x_pos(0), y_po原创 2006-02-25 01:57:00 · 836 阅读 · 0 评论 -
标准模板库(STL)介绍(上)
作者: winter 作者:Scott Field本文以List容器为例子,介绍了STL的基本内容,从容器到迭代器,再到普通函数,而且例子丰富,通俗易懂。不失为STL的入门文章,新手不容错过! 这篇文章是关于C++语言的一个新的扩展——标准模板库的(Standard Template Library),也叫STL。 当我第一次打算写一篇关于STL的文章的时候转载 2006-02-25 06:01:00 · 1184 阅读 · 0 评论 -
标准模板库(STL)介绍(英文版)
Introduction to STL, Standard Template LibraryBy Scott Field This article is about a new extension to the C++ language, the Standard Template Library, otherwise known as STL. When I转载 2006-02-25 06:00:00 · 1196 阅读 · 0 评论 -
string详细解说
,有了STL,这些处理会得到很大的简化。我们可以使用 fstream来代替麻烦的fopen fread fclose, 用vector 来代替数组。最重要的是用 string来代替char * 数组,使用sort排序算法来排序,用unique 函数来去重。听起来好像很不错 smile 。看看下面代码(例程1):#include #include #include #include #include转载 2006-02-25 05:46:00 · 1125 阅读 · 0 评论