自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 memset函数的用法

memset函数赋值用法

2024-03-07 09:17:08 454

原创 Python 爬虫爬取网页

工具:python 2.7import urllibimport urllib2def getPage(url)://爬去网页的方法 request=urllib.Request(url)//访问网页 reponse=urllib2.urlopen(request)返回网页 return response.read()//读取网页内容url='所需要爬取的...

2018-05-20 17:30:27 455

原创 链队的基本操作

定义#define QueueSize 6typedef struct node{ int data; struct node *next;}QueueNode;typedef struct {//封装头尾指针 QueueNode *front; QueueNode *real;}Queue;实现#include"stdio.h"#in

2018-01-06 17:43:51 458

原创 顺序队列的基本操作

定义#define QueueSize 6typedef struct {//定义 int data[QueueSize]; int fornt,real;//头指针,尾指针}Queue;实现#include"stdio.h"#include"stdlib.h"#include"s.h"void InitQueue(Queue *p){//初始化队列

2018-01-06 16:09:48 819

原创 链栈的基本操作

定义#define StackSize 6 //栈的元素个数typedef struct node{//定义 int data; struct node *next;}StackNode;实现代码#include"stdio.h"#include"stdlib.h"#include"s.h"void InitStack(StackNode **p){//初

2018-01-06 15:45:56 422

原创 栈的基本操作

#define StackSize 6typedef struct { int data[StackSize]; int top;}SeqStack;#include"stdio.h"#include"stdlib.h"#include"S.h"void InitStack(SeqStack *p){//初始化栈 p->top =-1;}int Emp

2018-01-05 22:15:21 194

原创 约瑟夫环——静态循环链表,动态循环链表

静态循环链表struct node{ int flag; int next;}arr[11];#include"stdio.h"#include"stdlib.h"#include"s.h"main(){ int i,j,k; for(i=0;i11;i++){ arr[i].flag =1; arr[i].nex

2018-01-04 22:01:52 489

原创 双向链表的基本操作

定义:#include"stdio"typedef int DataType;typedef struct node{DataType data;struct node *front,*next;}ListNode;1.创建双向链表ListNode *CreateList(int n,DataType *x){ListNode *p,*head,*s;int i;

2018-01-04 20:39:11 186

原创 单链表的基本操作

定义:#include"stdio.h"typedef int DataType;typedef struct node{DataType data; struct node *next; }ListNode;1.头插入法创建单链表ListNode *CrateListF(DataType *x,int n){int i;ListNode *head,*s;head=NULL;fo

2018-01-03 22:28:12 239

原创 顺序表的基本操作(C语言实现)

顺序表定义:#include"stdio.h"typedef int DataType;#define MaxSize 6typedef struct{ DataType data[MaxSzie]; int length; }SeList;实现:1.初始化顺序表void InitSeList(SeList *p){p->length=0;}2.创建顺序表

2018-01-03 21:24:07 1080

原创 投骰子游戏随机数

#include"iostream"#include"ctime"#include"cstdlib"using namespace std;int roll(){ int i=rand()%6+1;  int j=rand()%6+1;  int k=i+j;  cout<<"投掷的两点数之和为:"<<k<<endl;  return k;}enum result{ win,l

2017-03-30 13:59:19 1743

原创 负数十进制转二进制

负数十进制转二进制 三部 (1)先将十进制转为二进制数: 例:(-10)10=(00000110)2 带符号 (2)将二进制数取反: 取反得11111001 (3)将取得得反码加一: 得:11111010; 即(-10)10=(11111010)2 根据系统,如果int占32位得话需要补齐位数空位全部

2017-03-30 13:57:13 2671

空空如也

空空如也

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

TA关注的人

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