自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 c++类与结构体

#include<iostream>#include<string>using namespace std;struct MM{ int num;protected: string name;private: int age;public : int text;};//保护protected和私有private在继承中有区别,其余几乎没有void testMM(){ //MM mm = {28,"name",99,68};//结构体是公开的,但里面的.

2022-02-13 12:00:00 362

原创 c++类、结构体、链表

//#include<iostream>//#include<string>//using namespace std;////struct Node{ //节点模板 结构体// int data;// struct Node* next;//};//struct Node* createList() //链表模板 结构体//{// Node*newNode = new Node;// newNod.

2022-02-12 08:00:00 383

原创 二维指针创建数组储存数据

//一级指针可以存放多个普通变量int*p-->p[i];//二级指针可以存放多个一级指针int **p-->(*p)[j],次方型增长 #include<stdio.h>#include<string.h>#include<stdlib.h>int **createArray2D(int row, int cols){ //int *parray = (int*)malloc(sizeof(int*)*cols); //一级指针分配内存 .

2022-02-07 12:43:25 912

原创 c语言的内存动态申请:malloc、realloc、calloc区别

//c语言申请内存 malloc 和realloch calloc#include<stdio.h>#include<string>#include<iostream>using namespace std;void printff(int array[],int arrayNum){ for (int i = 0; i < arrayNum; i++) { cout << array[i] <<"\t"<&lt.

2022-02-06 20:28:45 526

原创 C语言单链表的创建反转与合并

//不采用封装的单链表#include<stdio.h>#include<stdlib.h>#include<assert.h>#include<time.h>typedef int DATA;typedef struct Node //创建节点的结构{ DATA data; struct Node *next;}NODE ,*LPNODE;LPNODE createList.

2022-01-31 23:42:44 1278

原创 有头单链表操作

#include<stdio.h>#include<stdlib.h>#include<assert.h>typedef int DataType;// struct Node//{// DataType data;// struct Node*next;//};// typedef struct Node NODE, *LPNODE;//删除节点才需要先连接,后释放;插入:先新节点连接下一个(原本当前节点)||先前驱节点连接新节点,都可以正常运行.

2022-01-31 12:00:00 141

原创 C语言双向链表

#include<stdio.h>#include<stdlib.h>#include<assert.h>//双向链表一般也是无头式数组链表,且采用再封装typedef struct NODE{ //创建节点的结构的模板 int data; struct NODE *front; struct NODE *tail;}NODE ,*LPNODE;LPNODE createN.

2022-01-30 10:40:52 861

原创 c语言数组双端栈

#include<stdio.h>#include<stdlib.h>#include<assert.h>#include<time.h>typedef struct{ int *dataMemory; int maxSize; int stackTop[2];}STACK ,*LPSTACK; enum WAY{ Left,Right}; .

2022-01-28 12:00:00 545

原创 C语言链式栈

#include<stdio.h>#include<stdlib.h>#include<assert.h>//链式栈需要先进后出,采用头插法,每次取出数据后就删除此节点//无头链表比较适用typedef struct Node{ int data; struct Node* next;}NODE ,*LPNODE;typedef struct{ LPNODE stackTop; int curSize;}STACK ,*LPSTACK;.

2022-01-27 16:41:39 911

原创 C语言数组栈

#include<stdio.h>#include<stdlib.h>#include<assert.h>typedef struct{ int top; //栈顶标记 int *dataMemory; //内存大小 int maxSize; //元素最大个数}STACK ,*LPSTACK;//创建初始化的栈(1。创建空栈且确定存在,2.分配内存(类型转换 大小*数目.

2022-01-27 09:31:37 735

原创 c语言图形库实例1

//贴图步骤://1.图片路径:bmp是不改变 像素 的图片存储(位图,会比原图还大),jpg(压缩式),png(带透明度压缩),.avi .gif(动图)//2.定义图片变量//3.加载图片//4.贴图//5.等比例缩放//6.透明贴图//7.切图#include<stdio.h>#include<graphics.h>#include<conio.h>#include<mmsystem.h>#pragma comment(lib,.

2022-01-24 15:23:20 1295

原创 c语言文件拷贝

c语言基础

2022-01-20 00:00:00 1041

原创 一个简单的顺序表,较完善

顺序表入门

2021-11-29 23:26:15 449

原创 软件测试决策

#include<stdio.h>void event();int main(){ //问题要求,对功率大于五十马力的机器,维修记录不全或已运行10年以上的机器,应给与优先的维修处理, //假定维修记录不全和优先维修处理均已在别处有更严格定义,请建立决策表 //条件项与动作桩 //曾经运行最大功率大于五十马力? //维修记录不全? 动作 进行优...

2021-11-25 23:06:48 1817

原创 对电话号码判断合理性

/*** 中国移动,中国联通,中国电信都为11位的手机号* 中国"移动"前三位:* 135、136、137、138、139、147、150、151、152、157、* 158、159、172、178、182、183、184、187、188、195、197、198** 中国"联通"前三位:* 130、131、132、145、155、156、166、175、176、185、186、196** 中国"电信"前三位:* 133、149、153 、180 、181 、189、173、177、190、191、193、1

2021-11-21 12:40:01 815 1

原创 C语言输入日期向后一天预测

#include<stdio.h>//1日期开始时间为1920.01.01;结束为2050.12.31,首先对日期的合理性进行判断//2.由于可被四整除且不能被一百整除年份为润年,年份不同时,二月的数据有所改变(29或28),故第二对年份进行平润年判断//3.对月份进行大月小月判断:1,3,5,7,8,10,12为大月(31天);2,4,6,9,11为小月(除二月外,其余小月为30天)//进行数据运算,将输入日期向前位移一天,再判断得到的数据是否符合开局规定的极限值,是则输出,不是输出相

2021-11-20 19:58:22 508

原创 C语言电话号码判断合法性

#include <stdio.h>//使用数组接收输入的、需要判断的数值//先进行数值类型判断,如果输入了不属于int类型的值则直接判断失败//上述判断成功时,再对输入的数值进行长度判断,中国一般有三位数与十一位数的电话号码//满足类型与长度后,再进行判断号码是否符合中国电话号码规定int main(){printf(“输入回车键开始”);char s[100];int i;printf(“请输入需要判断的号码数据(数字类型):\n”);scanf("%s", &

2021-11-20 12:22:21 3734

原创 C语言设计电话号码判断是否符合中国号码

#include <stdio.h>//使用数组接收输入的、需要判断的数值//先进行数值类型判断,如果输入了不属于int类型的值则直接判断失败//上述判断成功时,再对输入的数值进行长度判断,中国一般有三位数与十一位数的电话号码//满足类型与长度后,再进行判断号码是否符合中国电话号码规定int main(){ printf(“输入回车键开始”); char s[100]; int i; printf(“请输入需要判断的号码数据(数字类型):\n”); scanf("%s", &s

2021-11-20 12:19:31 849

空空如也

空空如也

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

TA关注的人

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