上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 28 下一页
摘要: 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 阅读(67) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(393) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(274) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 1.set_intersection的用法 set_intersection用于求两个容器的交集,并将交集放到一个目标容器中,返回值是交集在目标容器中的最后一个元素的迭代器,#include <algorithm> #include <iostream> #include <vector> #inc 阅读全文
posted @ 2021-03-03 20:21 maycpou 阅读(467) 评论(0) 推荐(0) 编辑
摘要: 1.accumulate的用法 accumulate用于计算容器中所有元素的和,#include <numeric> #include <iostream> #include <vector> #include <numeric> int main(){ std::vector<int> vec0; 阅读全文
posted @ 2021-03-03 20:05 maycpou 阅读(54) 评论(0) 推荐(0) 编辑
摘要: 1.copy的用法 copy用于将容器内指定范围的元素拷贝到另一容器 #include <algorithm> #include <iostream> #include <vector> #include <algorithm> int main(){ std::vector<int> vec0; 阅读全文
posted @ 2021-03-02 21:17 maycpou 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 1.merge的用法 用于将两个有序的容器合并到另外一个容器,合并后的容器也是有序的。头文件#include <algorithm> #include <iostream> #include <vector> #include <algorithm> int main(){ std::vector< 阅读全文
posted @ 2021-03-02 19:29 maycpou 阅读(63) 评论(0) 推荐(0) 编辑
摘要: 1.使用const关键字定义的变量,不能对其变量的值进行修改,所以必须在初始化的时候进行赋值操作。 2.同一个项目中不同的cpp文件中定义的const全局变量不共享,即互相不能访问,即使是在不同的cpp中有同名的const全局变量,也是自己使用自己的不相互干扰,也不会报错变量同名。 3.如果希望在多 阅读全文
posted @ 2021-03-02 14:41 maycpou 阅读(613) 评论(0) 推荐(0) 编辑
摘要: 1.在定义一个指针的时候最好直接定义该指针指向的对象,如果实在不能确定它所指向的对象得值,可以先将其定义为一个空指针,空指针定义的方法有下面几点: int *p = 0; int *p = NULL; int *p = nullptr; 2.void*指针可以指向任意对象,用于指针指向得对象类型都不 阅读全文
posted @ 2021-03-02 10:34 maycpou 阅读(173) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 28 下一页