码迷,mamicode.com
首页 >  
搜索关键字:bcv std    ( 41629个结果
C++ STL容器用法(一):vector
一、在一个vector后面追加另一个vector 1 std::vector<int> vec1; 2 std::vector<int> vec2; 3 vec1.insert(vec1.end(), vec2.begin(), vec2.end()); ...
分类:编程语言   时间:2021-01-16 11:46:34    阅读次数:0
c++中将char* 的连续四个字节数据转换为int
今天在做p2p客户端的收发消息操作,由于传的消息是个结构体,前四个字节被定义为整型,用来判断是哪类报文,在收消息的时候就涉及吧char*转换为int 做法如下: auto recv_buf=std::make_unique<char[]>(1024);//分配1024字节的动态空间作为缓冲区 int ...
分类:编程语言   时间:2021-01-15 12:12:31    阅读次数:0
C语言-QQ消息轰炸器
使用前记得复制要发送的内容哦 1 #include<stdio.h> 2 #include<Windows.h> 3 4 int main(){ 5 int n; 6 char name[100]; 7 printf("请输入你要轰炸的对象:\n"); 8 scanf("%s",name); 9 p ...
分类:编程语言   时间:2021-01-15 12:11:40    阅读次数:0
SpringMVC介绍
什么是MVC 最典型的MVC就是JSP+servlet+JavaBean的模式 Spring-web SpringMVC public class MyServlet extends HttpServlet{ @Override protected void doPost(HttpServletRe ...
分类:编程语言   时间:2021-01-15 12:11:07    阅读次数:0
CF1361B
#include<bits/stdc++.h> using namespace std; const long long mod=1e9+7; const long long mod2 = 1e8+7; const long long N =1e6+10; void in(long long &x) ...
分类:其他好文   时间:2021-01-15 12:03:41    阅读次数:0
go defer bug
package mainimport ( "fmt" "os")func F() (int, string) { return 1, "o"}func ff(a int, s string) { fmt.Println(a) fmt.Println(s)}func f(p []byte) { p[1 ...
分类:其他好文   时间:2021-01-15 12:00:51    阅读次数:0
[lsnu]2021寒假训练_第二场
A - Biorhythms 题目链接 #include <iostream> #include <cstring> #include <algorithm> #include <cstdio> using namespace std; int main() { int cnt = 1; while ...
分类:其他好文   时间:2021-01-15 11:49:12    阅读次数:0
gcc-4.4.7升级到gcc-4.8.2
一、升级的前提 在centos6.5上安装Redis-6.0.10时报了如下的错误: cc1plus: 错误:无法识别的命令行选项“-std=c++11” 经过查阅相关资料发现原因是本centos6.5系统的gcc版本太低,查看当前gcc版本信息: 1 [root@localhost lib]# g ...
分类:其他好文   时间:2021-01-14 11:29:27    阅读次数:0
DIV3E 基环树
#include<bits/stdc++.h> using namespace std; #define lson l,m,rt<<1 #define rson m+1,r,rt<<1|1 #define rush! ios::sync_with_stdio(false);cin.tie(0); c ...
分类:其他好文   时间:2021-01-13 11:33:41    阅读次数:0
第K大的数
思路:维护一个K大小的最小堆,堆顶就是最小的元素,新元素都比堆顶小,当堆中元素个数小于K时,直接进入堆,当堆顶小于新元素时,弹出堆顶,新元素加入堆。 #include <iostream> #include <vector> #include <queue> using namespace std; ...
分类:其他好文   时间:2021-01-13 11:29:41    阅读次数:0
41629条   上一页 1 ... 41 42 43 44 45 ... 4163 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!