上一页 1 ··· 56 57 58 59 60 61 62 63 64 ··· 73 下一页
摘要: 原文地址:各个容器有很多的相似性。先学好一个,其它的就好办了。先从基础开始。先看看他们的分类吧标准STL序列容器:vector、string、deque和list。标准STL关联容器:set、multiset、map和multimap。非标准序列容器slist和rope。slist是一个单向链表,rope本质上是一个重型字符串。非标准关联容器hash_set、hash_multiset、hash_map和hash_multimap。(各容器成员对比见:【STL】各容器成员对比表)先看看list。listSTL中的list就是一双向链表,可高效地进行插入删除元素。list不支持随机访问。所以没有 阅读全文
posted @ 2011-07-22 15:55 wangkangluo1 阅读(428) 评论(0) 推荐(0)
摘要: 原文地址:http://chuna2.787528.xyz/shiyangxt/archive/2008/09/11/1289493.html第一部分:(参考百度百科)一、STL简介STL(Standard Template Library,标准模板库)是惠普实验室开发的一系列软件的统称。它是由Alexander Stepanov、Meng Lee和David R Musser在惠普实验室工作时所开发出来的。现在虽说它主要出现在C++中,但在被引入C++之前该技术就已经存在了很长的一段时间。STL的代码从广义上讲分为三类:algorithm(算法)、container(容器)和iterator(迭 阅读全文
posted @ 2011-07-22 15:53 wangkangluo1 阅读(424) 评论(0) 推荐(0)
摘要: a.h#ifndef A_H_ #define A_H_typedef long int int4;#define MAX( x, y ) ( ((x) > (y)) ? (x) : (y) )#define g_new(structs) malloc(sizeof(... 阅读全文
posted @ 2011-07-21 10:52 wangkangluo1 阅读(382) 评论(0) 推荐(0)
摘要: a.h#ifndef A_H_#define A_H_#include <iostream>class Tdate{public: void Set(int,int,int); int IsLeapYear(); void Print();private: int month; int day; int year;};#endif a.cc#include <iostream> #include "a.h" using namespace std;void Tdate::Set(int m,int d,int y){ ... 阅读全文
posted @ 2011-07-21 10:44 wangkangluo1 阅读(742) 评论(0) 推荐(0)
摘要: 字符串替换 :3,15 s#"#'#g #将3到15行的"换成':%s/\%u3000//g 删除中文空格生成帮助标签:helptags ~/.vim/doc 阅读全文
posted @ 2011-07-21 10:15 wangkangluo1 阅读(332) 评论(0) 推荐(0)
摘要: 一.目录结构和源码:下载地址:http://u.115.com/file/dn9rgh86目录结构: wangkangluo1 --Makefile.am --src --Makefile.am --findStringsWithoutCase.h --findStringsWithoutCase.c代码如下:wangkangluo1 --Makefile.amSUBDIRS = src wangkangluo1 --src --Makefile.amAUTOMAKE_OPTIONS=foreign lib_LTLIBRARIES= libwangkangluo1.lalibwangkangl 阅读全文
posted @ 2011-07-20 20:18 wangkangluo1 阅读(307) 评论(0) 推荐(0)
摘要: 源码:编译:gcc -g -Wall -O0 strings.c -o strings -lm/* * ===================================================================================== * * Filename: strings.c * * Description: * * Version: 1.0 * Created: 07/20/2011 06:01:17 PM * Revision: none * Compiler: gcc * * Author: kangle.wang (mn), wangkan 阅读全文
posted @ 2011-07-20 19:11 wangkangluo1 阅读(5029) 评论(0) 推荐(1)
摘要: 原文地址:http://chuna2.787528.xyz/napoleon_liu/articles/2001802.html调不尽的内存泄漏,用不完的ValgrindValgrind 安装1. 到www.valgrind.org下载最新版valgrind-3.2.3.tar.bz22. 解压安装包:tar –jxvf valgrind-3.2.3.tar.bz23. 解压后生成目录valgrind-3.2.34. cd valgrind-3.2.35. 运行./autogen.sh设置环境(需要标准的autoconf工具)(可选)6. ./configure;配置Valgrind,生成Make 阅读全文
posted @ 2011-07-20 09:44 wangkangluo1 阅读(18517) 评论(1) 推荐(4)
摘要: 原文地址:Valgrind使用说明Valgrind是运行在Linux上一套基于仿真技术的程序调试和分析工具,是公认的最接近Purify的产品,它包含一个内核——一个软件合成的CPU,和一系列的小工具,每个工具都可以完成一项任务——调试,分析,或测试等。Valgrind可以检测内存泄漏和内存越界,还可以分析cache的使用等,灵活轻巧而又强大。一Valgrind概观Valgrind的最新版是3.2.3,该版本包含下列工具:1、memcheck:检查程序中的内存问题,如泄漏、越界、非法指针等。2、callgrind:检测程序代码覆盖,以及分析程序性能。3、cachegrind:分析CPU的cach 阅读全文
posted @ 2011-07-20 09:26 wangkangluo1 阅读(43981) 评论(0) 推荐(2)
摘要: 环境搭建软件:xampp 下载地址:http://www.php100.com/html/download/server/2010/0304/4048.html1.安装安装后打开看到如下:2.开启服务启动apache Mysql服务ru3.访问地址到浏览器输入:http://127.0.0.1/xampp/splash.php看到如下界面: 说明PHP 环境已经搭建好了编写helloworld:到你的安装路径:(我安装在D盘下)打开文件夹看到php语言默认放在htdocs目录下:到htdocs文件夹下新建文件helloworld.php打开helloworld.php文件输入如下代码:< 阅读全文
posted @ 2011-07-19 19:08 wangkangluo1 阅读(7146) 评论(1) 推荐(0)
上一页 1 ··· 56 57 58 59 60 61 62 63 64 ··· 73 下一页