自定义博客皮肤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)
  • 问答 (1)
  • 收藏
  • 关注

原创 STM32使用内部晶振的配置方法

**STM32使用内部晶振的配置方法**首先,STM32使用内部晶振需要在代码里面配置,以STM32RCT6为例,在使用内部晶振的情况下最高运行频率为64Mhz,程序只需要在system_stm32f10x.c中配置即可,代码如下,复制以下代码覆盖system_stmf10x.c即可。/** ****************************************************************************** * @file system_st

2023-07-13 23:18:06 2088 1

原创 WPS做论文的时候为什么文字后面不能添加下划线?

WPS文档无法添加下划线

2022-12-13 17:03:54 1239 1

原创 2021-10-02

关于全局函数的类名限定符:: 就是当类中有一个和全局函数名字一模一样的函数的时候,想调用全局函数的时候就要在类中加 "::" ,类名限定符号,

2021-10-02 23:16:19 121

原创 C++链表(自制版)

/*1.C++的链表连接过程是由构造函数完成的2.成员访问要注意访问权限*/#include<iostream>#include<string>using namespace std;struct Data //节点描述{ //数据由两部分组成的 一个是key 一个是data const int key; string data; //key的初始化必须采用初始化参数列表 Data(int key, string name) :key(key), d.

2021-06-21 11:34:07 172

原创 *转载*《编程的智慧》(作者:王垠)

反复推敲代码有些人喜欢炫耀自己写了多少多少万行的代码,仿佛代码的数量是衡量编程水平的标准。然而,如果你总是匆匆写出代码,却从来不回头去推敲,修改和提炼,其实是不可能提高编程水平的。你会制造出越来越多平庸甚至糟糕的代码。在这种意义上,很多人所谓的“工作经验”,跟他代码的质量其实不一定成正比。如果有几十年的工作经验,却从来不回头去提炼和反思自己的代码,那么他也许还不如一个只有一两年经验,却喜欢反复推敲,仔细领悟的人。有位文豪说得好:“看一个作家的水平,不是看他发表了多少文字,而要看他的废纸篓里扔掉了多少。”

2021-05-23 21:28:21 238

原创 文本文件读写(自制版)

/* 1.以字符的方式读写 int fgetc(FILE* stream); int fpuct(int x,FILE* stresm) 2.以字符串的方式读写 3.格式化读写 注意点:所有的文件读写操作,都不需要自己去改变文件指针的位置, 读写的时候,文件在文件操作中已经做了移动操作*/#include <stdio.h>//将文件操作封装void writeFileByChar(const char* fileNa

2021-05-17 13:17:53 139

原创 认识文件(完整版)

#include <stdio.h>//常用的流//流: 数据从一个地方流向另一个地址//标准输入流 stdin --->键盘输入到程序//标准输出流 stdout--->屏幕//文件流(自定义流) //1.ASCII文件(文本文件) //2.二进制文件(字节流)//文件操作基本流程:// 1.定义文件指针// 2.打开文件 //FILE* fopen( char const* _FileName,char const* _Mode); //打开文件失败的

2021-05-17 13:16:52 217

原创 文本形式读写(完整版)

#include <stdio.h>#include <string.h>/* 1.以字符的方式读写 int fgetc(FILE* stream); int fputc(int x,FILE* stream); 2.以字符串的方式读写 3.格式化读写 注意点:所有的文件读写操作,都不需要自己去改变文件指针的位置, 读写时候,文件在文件操作函数中已经做了移动操作*///字符方式读写void writeFileByChar(const char* file

2021-05-17 13:16:09 187

原创 文件的二进制读写(完整版)

#include <stdio.h>#include <string.h>/* C语言文件操作就是调用库中的函数 fwrite size_t : unsigned int size_t fwrite(void const* _Buffer, // 要写的内容首地址 size_t size, //写的大小 size_t cout, //写几次 FILE* _Stream //写到那个文件中去 );

2021-05-17 13:15:29 386

原创 文件指针移动(完整版)

#include <stdio.h>/* 1.rewind(FILE* fp); 2.fseek(FILE* fp,long size,int mode) size:相对于参照点的偏移字节数 mode:参照位置 SEEK_CUR : 当前位置 SEEK_SET : 开始的位置 SEKK_END: 结束位置 3. ftell(fp) 文件指针移动多个位置*/int main() { FILE* fp = fopen("1.txt", "w+"); /

2021-05-17 13:14:37 2162 1

原创 文件重定向(完整版)

#include <stdio.h>int main() { FILE* in=freopen("1.txt", "r", stdin); //所有输入值都在1.txt中 FILE* out = freopen("2.txt", "w", stdout); //所有的输出结果都在2.txt显示 int a = 0, b = 0; scanf_s("%d%d", &a, &b); //用户不需要输入,文件中值会自动读到变量中 printf("sum=%d

2021-05-17 13:13:44 283

原创 有头链表的管理系统(完整应用版)

#include <stdio.h>#include <malloc.h>#include <stdlib.h>#include <string.h>/* xxx管理系统 1.先写链表*/struct MM { char name[20]; int age; int num;};//节点描述struct Node{ //int data; //数据域 struct MM data; struct Node* next

2021-05-11 13:35:23 111

原创 无头链表的二级指针写法(完整版)

#include <stdio.h>#include <stdlib.h>#include <assert.h>//子函数修改实参typedef struct Node { int data; struct Node* next;}NODE,*LIST,*LPNODE;LPNODE createNode(int data) { LPNODE newNode = (LPNODE)malloc(sizeof(NODE)); assert(newNod

2021-05-11 13:33:52 85

原创 无头链表(完整版)

#include <stdio.h>#include <stdlib.h>#include <assert.h>struct Node { int data; struct Node* next;};struct Node* createNode(int data) { struct Node* newNode = (struct Node*)malloc(sizeof(struct Node)); assert(newNode); newNod

2021-05-11 13:33:02 333

原创 认识链表(自制版)

#include<stdio.h>/* 链表就是多个结构体变量与结构体变量通过结构体指针连接在一起*/struct MM{ char name[20]; int age; int num;};struct Node{ int Data; struct Node* next;//实现链表关键点,通过指针指向下一个链表节点,实现节点的连接};int main(){ //先创建三个节点 struct Node node1 = { 1,NULL }; st

2021-05-11 13:30:32 62

原创 单链表(自制版)

#include<stdio.h>#include<malloc.h>//节点描述struct Node{ int data; //数据域 struct Node* next;//指针域};//链表的增删改查都是用函数来实现的,需要注意函数之间的搭配//1.创建表头 --->结构体变量struct Node* createHrad(){ struct Node* headNode = (struct Node*)malloc(sizeof(st

2021-05-11 13:29:22 79

原创 单链表(完整版)

#include <stdio.h>#include <malloc.h>/* xxx管理系统 1.先写链表*///节点描述struct Node { int data; //数据域 struct Node* next; //指针域};//1.创建表头 ---->结构体变量struct Node* createHead() { struct Node* headNode = (struct Node*)malloc(sizeof(stru

2021-05-11 13:26:52 163

空空如也

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

TA关注的人

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