《C++ Primer Plus》学习笔记10
第16章 string类和标准模板库
主要内容:
1)标准的C++string类
2)auto_ptr模板
3)标准模板库(STL)
4)容器类
5)迭代器
6)函数对象
7)STL算法
1、string类
1)构造字符串
//初始化为常规的C-风格的字符串
string one ("Lottery Winner!...
分类:
编程语言 时间:
2014-07-24 10:35:46
阅读次数:
465
Open Map,I am here.Open Map, I am here.Here are the pages list: How to launch Google Maps on iPhone via web link?Getting Safari to auto open Google M....
分类:
移动开发 时间:
2014-07-23 20:31:35
阅读次数:
196
记录几个问题: *********************************** 1、 有关设备的启动模式选项:(有待完善): 非自动启动模式 HOLD_AUTO_START:HOLD_AUTO_START is a compile option that will surpress ZDApp from startin...
分类:
其他好文 时间:
2014-07-23 18:13:47
阅读次数:
336
举例:grep -a -n -B 10 -C 10 --color=auto xxx文件 含义: -a 将 二进制文件以 text 文件的方式搜寻数据? -n 显示行号 ? ?--color=auto 来将关键字部分使用颜色显示 -B 10 关键字前面再显示10行? ?-C 10 关...
分类:
其他好文 时间:
2014-07-23 17:37:01
阅读次数:
196
C# 转战android 中,对eclipse不是很熟悉,搞了一段时间才发现原来有这设置囧Window->preferences->Java->Editor->Content Assist再右下角Auto activation triggers for Java里面改为.abcdefghijklmn...
分类:
系统相关 时间:
2014-07-23 15:15:26
阅读次数:
262
在某些情况下,or条件可以避免全表扫描的。 1 .where 语句里面如果带有or条件, myisam表能用到索引, innodb不行。1)myisam表: CREATE TABLE IF NOT EXISTS `a` ( `id` int(1) NOT NULL AUTO_INCREMENT, `...
分类:
数据库 时间:
2014-07-23 12:44:26
阅读次数:
303
1、智能提示(1). 打开Eclipse,选择打开" Window - Preferences"。(2). 在目录树上选择"Java-Editor-Content Assist",在右侧的"Auto-Activation"找到"Auto Activation triggers for java"选项...
分类:
系统相关 时间:
2014-07-22 22:48:33
阅读次数:
294
初始化:1 #include //auto_ptr header2 void f()3 {4 auto_ptr ptr(new classA);5 }拷贝:1 //auto_ptr can't be initialized by = operator2 auto_ptr ptr1(new cla.....
分类:
其他好文 时间:
2014-07-22 22:47:14
阅读次数:
198
实际上auto_ptr 只是C++标准库提供的一个类模板,它与传统的new/delete控制内存相比有一定优势,使用它不必每次都手动调用delete去释放内存。当然有利也有弊,也不是完全完美的。
本文从下面的8个方面来总结auto_ptr使用的大部分内容。
1. auto_ptr是什么?
auto_ptr 是C++标准库提供的类模板,auto_ptr对象通过初始化指向由new创建的动态内存,...
分类:
编程语言 时间:
2014-07-21 22:22:38
阅读次数:
276