自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(6)
  • 收藏
  • 关注

原创 2021-06-22 字符串数组测试 数组名(指针)

#include <stdio.h> int main(int argc, char** argv) { char ch[20]; //ch=“abcdefg”;//不可以给数组名(指针 常量)赋值 scanf("%s",ch);//可行 此处是将一个字符串写入到数组名(指针常量)的地址下 printf("%s\n",ch); printf(“Hello world!\n”); return 0; } ...

2021-06-22 10:31:01 50

原创 2021-03-28

set容器-排序案例 class myCompare { public: bool operator()(int v1, int v2)const//vs2019需要加这个 const//变成常函数,只读函数,函数内部不可修改成员 { return v1 > v2; } };

2021-03-28 08:36:52 39

原创 2021-03-27

黑马程序员 C++ list容器-构造函数 void printList(list<int>& lst) { for (list<int>::iterator it = lst.begin(); it < lst.end(); it++) { cout << *it << " " << endl; } cout << endl; } 这里的循环刚开始我采用的判断条件是小于号;但是编译器会报错,没有与之匹配的运

2021-03-27 10:17:47 56

原创 2021-03-26

C++ 学习,STL案例-评委打分01 #include<iostream> using namespace std; #include<vector> #include<deque> #include<algorithm> #include<string> #include<ctime> class Person { public: Person(string name, int score) { this->m_Na

2021-03-26 15:14:06 44

原创 2021-03-22

函数模板案例-数组排序 #include<iostream> using namespace std; template<class T> void mySort(T arr[], int len) { for (int i = 0; i < len ; i++) { int min = i; for (int j = i + 1; j < len; j++) { if (arr[min] > arr[j]) { min = j

2021-03-22 14:48:55 54

原创 C++学习中的一点心得以及疑惑01

多态中的原理分析 源代码: //利用多态实现计算器 //实现计算器抽象类 class AbstructCalculate { public: int m_Num1 = 0; int m_Num2 = 0; virtual int getResult0() { return 0; } }; //加法类 class Add :public AbstructCalculate { //public: int getResult0() { return m_Num1 + m_Num2; } };

2021-03-16 16:37:01 56

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除