自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 SpringMVC无法加载静态资源,设置了不拦截文件还是不行?

在网上找了各种各样的方法,主流的有三种<mvc:resources location="/all" mapping="/all/**" />在xml文件设置特定后缀不拦截直接所有静态资源都不拦截以下是三种方法的链接三种方法解决静态资源拦截问题然后挨个试了个遍,都不行,设置了 < mvc:default-servlet-handler />之后。虽然说不会再报映射错误,但是静态资源依旧没办法访问,这就很奇怪了。按道理来说没有映射错误之后静态资源就应该可以访问了。最后

2020-10-01 13:47:55 295

原创 C语言实现图的邻接矩阵的广度遍历

#include<stdio.h>#include<stdlib.h>//--------------------------------------以下是邻接矩阵部分------------------------------//第一步骤,边的定义struct Enode{ int v1,v2; int weight;};typedef struct...

2019-05-19 21:32:21 1391

原创 C语言邻接表的深度优先遍历

#include<stdio.h>#include<stdlib.h>//--------------------------------------------------------//定义边struct Enode{ int v1,v2; int weight;};typedef struct Enode *Edge;//定义邻接点struct...

2019-05-16 13:17:11 1257

原创 函数和结构体顺序不同导致大函数无法找到应该要引用的小函数

#include<stdio.h>#include<stdlib.h>void funbig(){ funsmall();}void funsmall(){ int i=0;}int main(){ funbig();return 0;}此时计算机会报错c3841:函数funbig没有找到标识符也就是说,没有找到funsm...

2019-05-16 13:08:59 125

原创 C语言实现一个邻接表(动态数组)+(默写版)

#include<stdio.h>#include<stdlib.h>/*这波有一点要牢记,这个和我之前打的邻接矩阵的代码不同邻接矩阵的代码的节点编码是从1开始的,我设置了一下。但这个邻接表的代码是从0开始编号节点的,千万不要弄错了!!!*///步骤一,定义边struct Enode{ int v1,v2; int weight;};typede...

2019-05-16 01:58:53 445

原创 c语言实现一个邻接矩阵(动态数组)+(默写版)

#include<stdio.h>#include<stdlib.h>//第一步骤,边的定义struct Enode{ int v1,v2; int weight;};typedef struct Enode* Edge;//第二步骤,图的定义struct Gnode{ int Nv,Ne; int** GL; //定义一个二维数组};...

2019-05-12 18:42:41 505

转载 如何动态的分配一个二维数组(百度超详细版)

https://jingyan.baidu.com/article/46650658f407aff548e5f871.html搜索以上网址即可

2019-05-12 15:38:56 1117

原创 c语言图的邻接表(没有main函数)

#include<stdio.h>#include<stdlib.h>//定义边typedef struct Enode{ int v1,v2; int weight;} *Edge;//定义邻接点(构造边表)typedef struct Adjvnode{ int sign; int weight; struct Adjvnod...

2019-05-11 16:30:25 184

转载 指针以及内存分配

指针很灵活,这使得指针很难管理,在定义指针时,将在栈中开辟一块内存存放指针的地址(栈内的内存由系统分配和释放),指针的地址内存只是存放指针的地址,不存放指针指向的数据,值得注意的是,定义指针时指针会随机指向一块内存,如int *p;p会指向一块不为空的内存,相当危险,例如执行判断if(!p){ printf(“p为空”);};这里不会输出"p为空";所以在定义时想让指针p为空,则要int ...

2019-05-11 16:09:46 392

原创 为什么链表的最后一个(尾节点)如果没有rear->next=NULL;这个链表就会错呢?

我来告诉你为什么!这个错误你已近犯了很多次,告诉你以后就不要在犯错了如果在单向链表中,最后一个节点没有明确的指向的话计算机既认为这个链表是没有建立完全的,它是不会停止的。所以我们在建造链表时一定要牢记,最后一个节点一定要有所指向是头结点形成循环链表也好,指向一个NULL值也好。总而言之是不可以空着的!记住了!...

2019-05-11 16:08:51 5175

原创 c语言最简单二分查找完整版

#include<stdio.h>int divdeFind(int list[],int k,int i){ int left=0;int right=i-1;int mid;while(right>=left)  {     mid=(left+right)/2;   if(k==list...

2019-05-11 16:07:30 293

原创 c语言顺序栈的实现

这里写自定义目录标题#include<stdio.h>#include<stdlib.h>//初始化一个顺序栈struct snode{ int Top; int Max; int *Data;};//判断这个栈是否满了,满了为false,不满为truebool full(struct snode *s){ if(s->Top==s-&g...

2019-05-11 16:07:16 392

原创 c语言顺序队列的实现

#include<stdio.h>#include<stdlib.h>//对一个顺序队列进行初始化typedef struct Qnode{ int *Data; int Front,Rear; int Max;} *Queue;//创建一个空队列Queue CreateQueue(int max){ Queue q=(Queue)malloc(si...

2019-05-11 16:06:40 649

原创 c语言实现单个插入节点的链表(仅有初始化和创建两个函数)

#include<stdio.h>#include<stdlib.h>//给队列初始化struct node{int data;struct node*next;};//单节点插入链表函数void Add(int x,struct node *ptail){ struct node *pnew=(struct node*)malloc(sizeof(...

2019-05-11 16:06:27 359

原创 c语言实现一个邻接矩阵的存储(main函数没有打)

#include<stdio.h>#include<stdlib.h>//初始化图struct Gnode{ int Nv; int Ne; int G[100][100]; char Data[100];};typedef struct Gnode* Graph;//初始化边struct Enode{ int v1,v2; int we...

2019-05-11 16:05:23 236

原创 c语言实现链式队列

#include<stdio.h>#include<stdlib.h>//初始化队列节点所包含的内容struct node{ int Data; struct node *next;};typedef struct node* Node;//初始化一个空的链表队列struct Qnode{ Node Front,Rear;};typedef st...

2019-05-11 16:04:16 892 1

原创 c语言中,如果我让节点指针指向下一个节点,但下一个节点没有赋值会怎么样?

我们首先来试试下一个节点动态分配了内存的(头文件略过)struct node{ int Data; struct node *next;};int main(){ struct node *A=(struct node *)malloc(sizeof(struct node)); A->next=(struct node *)malloc(sizeof(struct n...

2019-05-09 12:37:26 3081 1

空空如也

空空如也

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

TA关注的人

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