这里先开个头,以后做详细补充个;

new 分配内存失败后会返回空指针;

随机推荐

  1. Win10应用设计的那些事儿

    此文已由作者杨凯明授权网易云社区发布. 欢迎访问网易云社区,了解更多网易技术产品运营经验. 继Windows 10系统发布之后,很多Windows用户更新了系统.win10系统的发布,在以往的metr ...

  2. 死磕了一题模拟 A掉的时候我是爽的

    ZOJ 3490 没有题解. 一句话,要么贴代码,要么自己打. #include<cstdio> #include<iostream> #include<vector&g ...

  3. bzoj 2599: [IOI2011]Race【点分治】

    点分治,用一个mn[v]数组记录当前root下长为v的链的最小深度,每次新加一个儿子的时候都在原来儿子更新过的mn数组里更新ans(也就是查一下mn[m-dis[p]]+de[p]) 这里注意更新和初 ...

  4. P2024 [NOI2001]食物链

    第一种说法是"1 X Y",表示 X 和 Y 是同类. 第二种说法是"2 X Y",表示 X 吃 Y . 根据这句话 可以看出来这是一个种类并查集 种类并查集 ...

  5. 合作网络(Corporative Network )并查集+路径压缩

    #include <iostream> #include <algorithm> #include <string> using namespace std; + ...

  6. sybase修改默认字符集为cp936

    原文地址:http://blog.sina.com.cn/s/blog_4d6854860100xn3f.html 报错信息:2402 error converting characters into ...

  7. iOS UILabel UITextView自适应文本,或文本大小自适应

    //UILabel自适应文本的高度 UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(, , , )]; label.numberOf ...

  8. 转 OGG Troubleshooting-Database error 1 (ORA-00001: unique constraint ...)

    Q5: After imp data to target, when we start replc process, we find the following error: 2011-11-10 0 ...

  9. 142 Linked List Cycle II 环形链表 II

    给一个链表,返回链表开始入环的第一个节点. 如果链表无环,则返回 null.说明:不应修改给定的链表.补充:你是否可以不用额外空间解决此题?详见:https://leetcode.com/proble ...

  10. CentOS 7.4安装mariadb,启动报错

    [root@iZ25b6alxstZ ~]# systemctl start mariadb Job for mariadb.service failed because the control pr ...