
c++ STL
mu_gong
这个作者很懒,什么都没留下…
展开
-
stl hello_world 例子
// Program: Vector Demo 1// Purpose: 用于演示STL vector// #include "stdafx.h" - 如果你使用预编译需要包含此文件[[#ExplainIn2][注2]]#include // STL vector 头文件. 注意,并没有".h"#include // 需要用到 coutusing namespace std; // 确原创 2005-09-13 14:56:00 · 962 阅读 · 0 评论 -
stl 简单例子
#include #include #include using namespace std;int main(void){ vector num; // STL中的vector容器 int element; // 从标准输入设备读入整数, // 直到输入的是非整型数据为止 while (cin原创 2005-09-13 11:47:00 · 967 阅读 · 0 评论 -
stl读取ini配置文件例子
#ifndef _INIFILE_H__#define _INIFILE_H__#include #include #include #include #include #include using namespace std;typedef map > strMap;typedef strMap::iterator strMapIt;const char*const MIDDLESTRING =原创 2005-09-13 15:00:00 · 1673 阅读 · 0 评论 -
别人写的一个智能指针的实现,不知道能不能行
一个智能指针的实现 发布时间: 2004-06-30 21:36:14 来源/作者:优快云 用C++写程序的人都知道内存泄漏这个问题(除非他从来不动态分内存),对STL有了解的人都知道有auto_ptr这么个智能指针,可因为它只能有一个拥有权,所以不能支持标准容器,一直不太喜欢这点。能开发出一个共享访问的智能指针就好多了(这有点像Windows内核对象)。所以,需要有个对象来管理计数问题,原创 2005-09-13 17:05:00 · 1036 阅读 · 0 评论