E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
endl
C++线程运行的开始和结束(代码演示)
include#include#includeusingnamespacestd;//自己创建的线程,而需要从一个函数开始运行(初始函数)voidmyprint(){cout<<"我的线程开始了"<<
endl
咩咩要学习
·
2023-12-05 17:24
c++
学习笔记
c++
C++:字符型变量
#includeusingnamespacestd;intmain(){charch='a';//要用单引号,且只能有一个字符cout<
endl;cout<
endl
咩咩要学习
·
2023-12-05 17:23
学习笔记
c++
c++ 中函数形参没有变量名
类似这样:intadd(int,int);//声明intmain(){cout<
endl;}intadd(inta,in
aLLLiyyy
·
2023-12-05 16:31
c++函数声明
《C++》2.缺省参数,函数重载
1.缺省参数//缺省参数voidFunc(inta=0){cout<
endl;}intmain(){Func(1);Func();return0;}//全缺省voidFunc(inta=10,intb
ILLENIUM..
·
2023-12-05 15:33
C++
c++
C++作业5
(有指针成员)代码:#includeusingnamespacestd;classBed{private:double*money;public:Bed(){cout<<"Bed::无参构造函数"<<
endl
施纪
·
2023-12-05 13:38
c++
算法
开发语言
12.4c++中的继承
public:Sofa(){}//有参构造函数Sofa(stringway,intscore):way(way),score(newint(score)){cout<<"Sofa::有参构造函数"<<
endl
久驻
·
2023-12-05 11:48
c++
算法
开发语言
C\C++ 获取最值
);//整数最小值}C++C++有模板,可以通过替换下面的int和double,可以获取任意数值类型的最大值或者最小值#includeintmain(){std::cout::min()<
endl
qq_38781075
·
2023-12-05 07:21
c++
12.4 C++ 作业
includeusingnamespacestd;//封装沙发类classSofa{private:string*sitting;public://无参构造函数Sofa(){cout<<"Sofa::无参构造函数"<<
endl
qjw.c
·
2023-12-05 07:49
c++
开发语言
算法
2023年11月30日作业
includeusingnamespacestd;classPer{private:stringname;intage;double*high;double*weight;public:Per(){cout<<"Per::无参构造函数"<<
endl
Huai1230
·
2023-12-05 01:34
c++
2023年11月28日作业
i]='a'&&str[i]='0'&&str[i]<='9'){num++;}elseif(str[i]==''){kg++;}else{oth++;}}cout<<"大写字符个数为:"<
endl
Huai1230
·
2023-12-05 01:04
c++
2023年12月4日:多继承
代码#includeusingnamespacestd;classSofa{private:stringsit;int*len;public:Sofa(){cout<<"Sofa::无参构造函数"<<
endl
Huai1230
·
2023-12-05 01:34
c++
dp-矩阵连乘
;while(M--){intn;cin>>n;for(inti=1;i>row[i]>>col[i];}cout<<getResult(n)<<
endl
云风Com
·
2023-12-04 18:02
算法
dp-最长公共子序列
stringstr2;cin>>str1;cin>>str2;memset(f,0,sizeoff);cout<<getResult(str1,str2)<<
endl
云风Com
·
2023-12-04 18:00
算法
华清远见嵌入式学习——C++——作业一
='a'&&str[i]='0'&&str[i]<='9'){sz++;}elseif(str[i]==''){kg++;}else{qt++;}}cout<<"字符串中大写字母个数为:"<
endl
谢俊翔
·
2023-12-04 14:53
学习
华清远见嵌入式学习——C++——作业4
includeusingnamespacestd;classStu{friendconstStuoperator*(constStu&L,constStu&R);friendbooloperators2"<<
endl
谢俊翔
·
2023-12-04 14:53
学习
c++中函数的重载
c++:#include#include"myadd.h"usingnamespacestd;intmain(){cout<
endl;return0;}myadd.h:#pragmaonce
爱喝水的泡泡
·
2023-12-04 12:33
c++
算法
开发语言
c++中函数的引用
int*y)//*x*y表示对xy取地址{inttmp=*x;*x=*y;*y=tmp;}voidtest01(){inta=10;intb=20;swap(&a,&b);cout<
endl
爱喝水的泡泡
·
2023-12-04 12:26
c++
开发语言
【C++】类和对象——explicit关键字,友元和内部类
这篇博客已经到了类和对象的最后一部分了,下面我们先看一下explicit关键字我们还是先来引入一个例子,我们的代码是可以这么写的classA{public:A(intaa=0){_a=aa;cout<<"A(intaa=0)"<<
endl
嘛弄
·
2023-12-04 07:39
c++
开发语言
724. 约数(C++语法题)
includeusingnamespacestd;intmain(){intn;cin>>n;for(inti=1;i<=n;i++){if(n%i==0)cout<<i<<
endl
一心敲代码
·
2023-12-04 03:07
C++题目
c++
算法
C++ string类(2)—成员访问、插入、删除、替换、查找和交换操作
intmain(){strings1("helloworld");cout<
endl;cout<
Han同学
·
2023-12-03 23:38
C++
c++
开发语言
C++保留小数
includeusingnamespacestd;intmain(){floata=3.1415926;//第一种,使用setprecisioncout<
endl
早点睡嘛
·
2023-12-03 17:23
C++
c++
开发语言
c++ 数组长度
2,6,3,1,9,8,10,5,4,0};intlength=sizeof(arr)/sizeof(arr[0]);std::cout<<"arrayarr'slength="<
endl
一路向前的小Q
·
2023-12-03 17:39
c++
c++
算法
数组
[题] 骨牌铺方格 #DP
f[i-1]+f[i-2];longlonga[52];intmain(){intn;a[1]=1,a[2]=2;for(inti=3;i>n){cout<<a[n]<<
endl
Y.YL
·
2023-12-03 13:52
算法
c++
C++之pair的简单用法
chart;strings;cvin>>t>>s;a={t,s};*/cout<<a.first<<":"<<a.second<<
endl
踏过山河,踏过海
·
2023-12-02 23:15
刷遍蓝桥杯
c/c++知识二次稳固
c++
visual
studio
开发语言
C++之substr的简单用法
includeusingnamespacestd;intmain(){stringa,b;cin>>a;b=a.substr(3,10);//第一个放开始截取的下标,第二个放要截取多长cout<<b<<
endl
踏过山河,踏过海
·
2023-12-02 23:44
刷遍蓝桥杯
c/c++知识二次稳固
c++
算法
哈希算法
C++ 输入输出流
对于cout来讲,当缓冲区满了或者遇到
endl
,就将缓冲区的全部数据送到显示器显示。
嗯哼丶是你呀
·
2023-12-02 16:55
c++
开发语言
编写函数求两个整数的最大公约数和最小公倍数
intj);//求最大公约数的函数intmain(){inti,j,x,y;cout>i;cout>j;x=fnl(i,j);y=i*j/x;cout<
endl
2201_75467393
·
2023-12-02 13:11
c++
穷举法找1-100的质数,用while循环语句。c++
<<
endl
;i++;}return0;}
2201_75467393
·
2023-12-02 13:41
c++
算法
c语言
穷举法找1-100的质数,for循环
<<
endl
;}return0;}
2201_75467393
·
2023-12-02 13:41
c++
算法
c语言
如何交换两个字符串
;cout<<"ap="<
endl;cout<<"bp="<
endl;swap(ap,bp);cout<<"swapap,bp
灬烟花易冷灬
·
2023-12-02 12:40
C++面试
c++
C++ 学习 之 类的初始化与逗号运算符的联动
我们来看一个代码classA{public:A(intx){cout<<"123"<<
endl
;}A(intx,inty){cout<<"456"<<
endl
;}}a=(1,2);intmain(){}
wniuniu_
·
2023-12-02 06:57
c++
学习
cout的输出整数格式
cout默认以十进制格式显示整数coutintmain(){inta;std::cout>a;std::cout<<"a="<<a<<std::
endl
;std
秃秃秃秃哇
·
2023-12-02 05:43
C++
c++
C++作业4
includeusingnamespacestd;classStu{friendconstStuoperator*(constStu&L,constStu&R);friendbooloperators2"<<
endl
施纪
·
2023-12-01 20:38
c++
12.1 C++ 作业 运算符重载
includeusingnamespacestd;classPerson{friendconstPersonoperator-(constPerson&L,constPerson&R);friendbooloperatorp2"<<
endl
qjw.c
·
2023-12-01 20:54
c++
算法
javascript
输入两个整数,输出它们的乘积。 ← Python 及 C++ 代码比较
int,input().split())print(x*y)【C++代码】#includeusingnamespacestd;intx,y;intmain(){cin>>x>>y;cout<
endl
hnjzsyjyj
·
2023-12-01 19:57
信息学竞赛
Python程序设计
#
基础语法
c++
python
栈内存与文字常量区
"abc";constchar*str5="abc";constchar*str6="abc";char*str7="abc";char*str8="abc";cout<<(str1==str2)<<
endl
weixin_34235457
·
2023-12-01 00:26
C++继承中同名的解决方法
define_CRT_SECURE_NO_WARNINGS#include#includeusingnamespacestd;classFather{public:Father(){a=10;}voidfunc(){cout<<1<<
endl
落落落sss
·
2023-11-30 23:13
c++
开发语言
c++的string 容器基础操作
strings2(10,'a');strings3(s2);strings4("hello");}//基本赋值操作voidtest02(){strings1;s1="hello";cout<
endl
落落落sss
·
2023-11-30 23:13
c++
开发语言
算法
C++学习之继承中修改成员权限细节
classA{public:intx=10;};classB:publicA{usingA::x;intx=100;};看看函数classA{public:voidfun(){cout<<"uuuu"<<
endl
wniuniu_
·
2023-11-30 22:25
c++
学习
c++
【C++ Primer Plus学习记录】基于范围的for循环(C++11)
array)的每个元素执行相同的操作,如下例所示:doubleprices[5]={4.99,10.99,6.87,7.99,8.49};for(doublex:prices)cout<
endl
画饼校长
·
2023-11-30 22:22
c++
学习
开发语言
visualstudio
算法
C++ 学习之匿名名字空间的使用细节
由于没有名字,所以相当于直接引入,但是没有引入定义如果发生冲突,则匿名空间中变量不起作用namespace{intx=10;}intmain(){cout<<x<<
endl
;//
wniuniu_
·
2023-11-30 22:49
c++
学习
c++
C++多线程之通过成员函数作为线程入口
使用成员函数作为线程的入口并封装线程基类接口classMyThread{public://入口线程函数MainvoidMain(){cout<<"MyThreadMain:"<
endl
yzZ_here
·
2023-11-30 17:13
c++
开发语言
C++语法学习笔记十四:派生类-调用顺序-访问等级-函数遮蔽
includeusingnamespacestd;//基类//类定义/类声明classHuman{public:Human(){std::cout<<"执行了Human::Human()"<
endl
哲学的天空
·
2023-11-30 17:36
#
3.2
C++
字符指针char*用法总结
chararr2[]="abcdef";constchar*p1="abcdef";constchar*p2="abcdef";if(arr1==arr2){//输出falsecout<<"true"<<
endl
芯辰大海
·
2023-11-30 13:55
C++
c++
开发语言
构造函数和析构函数可以在private中吗?
控制变量分析:我们来看以下两个场景:classtest{public:voidprint_a(){cout<<_a<<
endl
;}voidPrint
鹅一百
·
2023-11-30 09:17
C++
c++
开发语言
函数括号后边加冒号,并且后边跟一些数据是这个意思
includeusingnamespacestd;classPreson{public:Preson():m_a(10),m_b(20),m_c(30){cout<<"Preson的构造函数调用"<<
endl
心在不焉
·
2023-11-30 07:04
c++
蓝桥杯
c++
职场和发展
c++把变量添加到字符串中
includeusingnamespacestd;intmain(){stringstreamsstr;inta=3;sstr<<"valueis"<
endl
心在不焉
·
2023-11-30 07:03
c++
c++
开发语言
后端
c++ 自增数据超边界,会从最小值再次开始自增
#includeintmain(){unsignedcharnum=0;while(true){num++;std::cout<<(int)num<
endl;}return0;}输出
失去的青春---夕阳下的奔跑
·
2023-11-30 05:39
c++
自增
push_back和emplace_back区别
includeusingnamespacestd;classA{public:A(inti,intj):i_(i),j_(j){coutv;v.reserve(20);cout<<"createaobject:"<<
endl
CrazyFox%
·
2023-11-30 03:32
c++
C++ 语法
C++语法#includeusingnamespacestd;intmain(){//控制台输出std::cout5){cout5"<<
endl
;}else{cout<<"num小于等于5"<<
endl
彦楠
·
2023-11-29 19:14
C++
c++
开发语言
上一页
5
6
7
8
9
10
11
12
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他