auto ptr = new char[10];

delete ptr;

delete 一个动态数组不能直接delete ptr, 应该是 delete[] ptr;

MySTLString的更多相关文章

  1. C++实例 MySTLString

    #include <iostream> #include <cstring> #include <string> using namespace std; clas ...

随机推荐

  1. oracle行号排序问题

    1.创建一个student,并且插入数据 ),age int) '); '); '); '); '); commit; 2.直接按照age进行排序显示行号: select * from(select ...

  2. iOS_ @property参数分析

    @propert的相关参数 因为现在Xcode都是默认使用ARC所以现在分析主要是以ARC为主. 1.@property有哪些参数? 第一组: 内存管理特性 retain  assign  copy ...

  3. ubuntu 快捷图标

    ubuntu的图标都存在 /usr/share/applications下 图标是Desktop的后缀 首先gedit /usr/share/applications/xx.Desktop xx为应用 ...

  4. UVA11806Cheerleaders(容斥)

    转载请注明出处: http://www.cnblogs.com/fraud/          ——by fraud 题目意思:在m行n列的矩形网格中放k个相同的石子,问有多少中方法?每个格子最多放一 ...

  5. [转载]OpenSUSE 13.2/13.1 安装搜狗拼音输入法

    1. 添加 M17N 源: 13.2: sudo zypper ar -f http://download.opensuse.org/repositories/M17N/openSUSE_13.2/ ...

  6. css3 页面退出和进入的动画

    @-webkit-keyframes slideIn { from { -webkit-transform: translate3d(100%,0,0); transform: translate3d ...

  7. 数塔(dp)

    数塔 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submissi ...

  8. information_schema.optimizer_trace学习

    information_schema.optimizer_trace 用于追踪优化器的优化过程:通常来说这张表中是没有数据的,要想开户追踪要把 @@session.optimizer_trace='e ...

  9. linq分组查询

    string[] arrStr = { ".com", "www.baidu.com", "www.qq.com", "www.b ...

  10. javascript之DOM操作

    一.document.getElementById()    根据Id获取元素节点 <div id="div1"> <p id="p1"> ...