上一页 1 ··· 45 46 47 48 49 50 51 52 53 ··· 106 下一页
摘要: 转自:https://www.cnblogs.com/mrlsx/p/5510496.html 1.NULL为0值,nullptr是指针对象 NULL是一个宏定义,c中NULL为(void*)0,而c++中NULL为整数0: //C语言中NULL定义 #define NULL (void*)0 // 阅读全文
posted @ 2020-10-29 17:03 lypbendlf 阅读(336) 评论(0) 推荐(0)
摘要: 转自:https://www.zhihu.com/question/281940376 https://www.cnblogs.com/Yekko/p/13508941.html 这两个链接里说的有不一样的地方,到底以哪个为准,之后看cpprimer再确认。 1.基本概念 堆,英文是 heap,在内 阅读全文
posted @ 2020-10-28 20:28 lypbendlf 阅读(248) 评论(0) 推荐(0)
摘要: https://blog.csdn.net/ii0789789789/article/details/94899531,这个讲的很好 1.ref和&的例子 链接中讲的例子很好。 2.函数式编程 是对参数直接进行拷贝,而不是引用。 void f(int &a,int &b,int &c){ cout< 阅读全文
posted @ 2020-10-28 19:20 lypbendlf 阅读(519) 评论(0) 推荐(0)
摘要: https://segmentfault.com/a/1190000007304644,这个举的例子非常好,容易理解。 1.线程冲突 线程间共享进程的资源,在访问时可能会出现 线程冲突、内存一致性错误,解决的方法是线程同步。 当两个运行在不同线程的操作,作用在同一个数据上,会发生线程冲突 (Thre 阅读全文
posted @ 2020-10-28 00:46 lypbendlf 阅读(165) 评论(0) 推荐(0)
摘要: 转自:https://leetcode-cn.com/problems/binary-tree-preorder-traversal/solution/leetcodesuan-fa-xiu-lian-dong-hua-yan-shi-xbian-2/ 1.递归解法 前中后遍历都很简单,就不写了。 阅读全文
posted @ 2020-10-28 00:24 lypbendlf 阅读(181) 评论(0) 推荐(0)
摘要: j 阅读全文
posted @ 2020-10-27 22:24 lypbendlf 阅读(596) 评论(0) 推荐(0)
摘要: https://www.zhihu.com/question/19801131,这个下面的回答都很高质量。 1、介绍 https://www.cnblogs.com/smartlife/articles/12519130.html 先传入后被调用的函数。也是普通函数,因为程序通过参数把该函数的函数指 阅读全文
posted @ 2020-10-27 19:08 lypbendlf 阅读(92) 评论(0) 推荐(0)
摘要: 转自:https://www.cnblogs.com/wangguchangqing/p/6141743.html 1.区别 拷贝构造函数和赋值运算符的行为比较相似,都是将一个对象的值复制给另一个对象; 但是其结果却有些不同,拷贝构造函数使用传入对象的值生成一个新的对象的实例,而赋值运算符是将对象的 阅读全文
posted @ 2020-10-27 19:02 lypbendlf 阅读(627) 评论(0) 推荐(0)
摘要: https://www.cnblogs.com/huolong-blog/p/7587711.html 1.定义与用法 sizeof是一个操作符(operator)。 其作用是返回一个对象或类型所占的内存字节数。 sizeof有三种语法形式: 1) sizeof (object); //sizeof 阅读全文
posted @ 2020-10-27 17:36 lypbendlf 阅读(109) 评论(0) 推荐(0)
摘要: https://blog.csdn.net/p942005405/article/details/84764104 1.例子 上面链接中给出的例子: #include <vector> #include <string> #include <iostream> struct President { 阅读全文
posted @ 2020-10-27 17:13 lypbendlf 阅读(547) 评论(0) 推荐(0)
上一页 1 ··· 45 46 47 48 49 50 51 52 53 ··· 106 下一页