会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
maycpou
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
8
9
10
11
12
13
14
15
16
···
28
下一页
2021年3月7日
webpack(1)简单使用
摘要: 1.首先确保已经安装了node和npm 2.新建一个文件夹demo0,在demo0目录下执行npm init -y。该命令可以生成package.json配置文件 3.在demo0目录下执行:npm install webpack webpack-cli -D。该命令用于安装webpack 和web
阅读全文
posted @ 2021-03-07 16:58 maycpou
阅读(78)
评论(0)
推荐(0)
2021年3月5日
npm更改为淘宝镜像
摘要: npm config get registry:查看当前包下载地址 npm config set registry https://registry.npm.taobao.org:切换为淘宝镜像 npm config set registry https://registry.npmjs.org:改
阅读全文
posted @ 2021-03-05 20:55 maycpou
阅读(427)
评论(0)
推荐(0)
2021年3月4日
C++ 进阶知识点(1)读取流 无符号类型 常量表达式 可变函数参数
摘要: 1.在iostream头文件中除了经常使用的std::cout std::endl外其他也比较常用的函数 (1)std::cin用于从控制台读入数据 int x; std::cin>>x; std::cout<<x<<std::endl; (2)std::cerr和std::clog std::ce
阅读全文
posted @ 2021-03-04 17:06 maycpou
阅读(341)
评论(0)
推荐(0)
C++ 11新特性
摘要: 1.新的数据类型long long超长整型,当然还包括它的无符号类型unsigned long long 2.列表初始化,允许使用花括号来初始化变量 int a{10}; std::vector<int> vec{1,2,3}; 在用列表初始化的时候如果遇到精度丢失的情况会报错: int a{1.5
阅读全文
posted @ 2021-03-04 17:04 maycpou
阅读(176)
评论(0)
推荐(0)
2021年3月3日
stl(23)内置算法set_intersection
摘要: 1.set_intersection的用法 set_intersection用于求两个容器的交集,并将交集放到一个目标容器中,返回值是交集在目标容器中的最后一个元素的迭代器,#include <algorithm> #include <iostream> #include <vector> #inc
阅读全文
posted @ 2021-03-03 20:21 maycpou
阅读(564)
评论(0)
推荐(0)
stl(22)内置算法accumulate fill
摘要: 1.accumulate的用法 accumulate用于计算容器中所有元素的和,#include <numeric> #include <iostream> #include <vector> #include <numeric> int main(){ std::vector<int> vec0;
阅读全文
posted @ 2021-03-03 20:05 maycpou
阅读(66)
评论(0)
推荐(0)
2021年3月2日
stl(21)内置算法copy replace replace_if swap
摘要: 1.copy的用法 copy用于将容器内指定范围的元素拷贝到另一容器 #include <algorithm> #include <iostream> #include <vector> #include <algorithm> int main(){ std::vector<int> vec0;
阅读全文
posted @ 2021-03-02 21:17 maycpou
阅读(124)
评论(0)
推荐(0)
stl(20)内置算法merge sort random_shuffle reverse
摘要: 1.merge的用法 用于将两个有序的容器合并到另外一个容器,合并后的容器也是有序的。头文件#include <algorithm> #include <iostream> #include <vector> #include <algorithm> int main(){ std::vector<
阅读全文
posted @ 2021-03-02 19:29 maycpou
阅读(71)
评论(0)
推荐(0)
C++ const关键字定义变量
摘要: 1.使用const关键字定义的变量,不能对其变量的值进行修改,所以必须在初始化的时候进行赋值操作。 2.同一个项目中不同的cpp文件中定义的const全局变量不共享,即互相不能访问,即使是在不同的cpp中有同名的const全局变量,也是自己使用自己的不相互干扰,也不会报错变量同名。 3.如果希望在多
阅读全文
posted @ 2021-03-02 14:41 maycpou
阅读(686)
评论(0)
推荐(0)
C++ 空指针和void*
摘要: 1.在定义一个指针的时候最好直接定义该指针指向的对象,如果实在不能确定它所指向的对象得值,可以先将其定义为一个空指针,空指针定义的方法有下面几点: int *p = 0; int *p = NULL; int *p = nullptr; 2.void*指针可以指向任意对象,用于指针指向得对象类型都不
阅读全文
posted @ 2021-03-02 10:34 maycpou
阅读(189)
评论(0)
推荐(0)
上一页
1
···
8
9
10
11
12
13
14
15
16
···
28
下一页
公告