自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(39)
  • 问答 (4)
  • 收藏
  • 关注

原创 soundtouch库的编译与使用

使用vs逐个打开source下指定的三个项目文件,修改SDK,因为可能库中使用的是8.0,你使用的10.0。库的导入使用参考DLLTest来做就行,碰到*.dll的问题就把需要的dll拷贝到运行的项目路径下。在终端中输入下面指令,即可完成编译,生成的库在soundtouch下的lib里面。用法参考DLLTest项目已经很完善了,我主要用这个库实现倍速。打开vs,打开终端,切换到soundtouch的项目目录下。请选则source下的任意一个解决方案打开,我选择了DLL。

2023-09-02 23:46:23 329

原创 cannot find lpulse 和 lglib-2.0

代码】cannotfindlpulse和lglib-2.0。

2022-07-15 16:40:14 243 1

原创 C++,&的作用

&:表示引用。可以用于深拷贝从中可知地址一样相当同一个对象。当修改c中的值时,b也随着修改 众所周知 const int a=123;之后a为常量是不可以a=23;进行修改的,但如果&用于const呢?神奇的事情发生了 常量就这样地被修改了。从上述可知,一个变量前加了&=另一个变量。那么这两个变量属于同一个,只是名字不一样。注意的是&只能用于同一变量类型。...

2022-06-24 22:08:44 1354

原创 java字符串转换成整形排序

import java.util.Arrays;public class IntergerTest { public static void main(String []args) { String s1="12 23 45 65 1 21 5"; String[] s=s1.split(" ");//遇到空格分割(space segmentation encountered) int []a=new int [s.length]; .

2021-08-12 16:13:09 217

原创 java,int与String的相互转换

public class IntToString{ public static void main(String []args){ //String转换成int String s1="100"; int num1=Integer.parseInt(s1); //int转换成String int num=199; String s2=String.valueOf(num);}} ...

2021-08-12 15:41:25 62

原创 java,Math数学常用运算方法

Math 无构造方法,所有方法用static修饰通过类名直接访问package inherit;public class MathTest { public static void main(String []args) { /* public static int abs(int a) 返回参数绝对值,有long double等 public static double ceil(double a) 返回大于或等于参数的最小do

2021-08-11 23:07:20 61

原创 java,计算程序运行时间

public class TimeCalculation { public static void main(String []args) { /*System 类常用方法 public static void exit(int status) status 非0表示终止异常 public static long currentTimeMillis() 返回当前时间以毫秒为单位(当前时间与1970年间的毫秒值) */ .

2021-08-11 22:46:41 111

原创 java 类,继承,多态,抽象,接口

1、类java中数据成员能直接赋值如:public class{ private int age=10; private int number=32;}在创建对象是如果不对数据进行赋值,那么,会自动默认初始化为0数据成员可以直接赋值,但行为不能直接执行,要加方法,如图加方法main()方法中可以直接使用类中的protected和public属性,private属性要通过方法访问2、继承继承要至少两个类,继承格式 pu...

2021-08-11 21:29:40 107

原创 C++ 力扣 搜索插入

#include<iostream>#define MaxSize 100using namespace std;int Search(int a[], int length,int target){ //dichotomy ,return the address if found ,and insert if not found //二分法,找到就返回地址,找不到就插入 int right = length-1; int left = 0; int mid=(right +.

2021-08-09 14:49:59 68

原创 java随机数,获取

import java.util.Random;public class generating{ public static void main(String[] args) { for(int i=0;i<10;++i) { Random r=new Random(); int number=r.nextInt(10)+1; System.out.println(number); } }}

2021-08-05 17:24:55 74

原创 数据结构稀疏矩阵三元组的创建与插入

#include<iostream>#define MaxSize 100using namespace std;typedef struct{ int row;//the row of the element(该元素所在的行) int column;//the column in which the element is located(该元素所在的列) int element;}TupNode;class Triolet{private: TupNode tupl.

2021-08-01 21:36:40 629

原创 数据结构,BF算法

#include<iostream>#define MaxSize 1000using namespace std;typedef struct{ int data[MaxSize]; int length;}node;class String{public: node StrAssign(char a[])//string creation(字符串的建立) { node str; int i = 0; for (; a[i] != '\0'; ++i) .

2021-07-31 13:43:43 282

原创 数据结构链串的基本操作

#include<iostream>using namespace std;typedef struct node{ char data; int length; node* next;}node;void operator<<(ostream& cout, node*& head)//overloaded operator output string(重载运算符输出字符串){ if (head == NULL) { cout <&.

2021-07-30 21:29:34 320

原创 数据结构,顺序串的插入与替换

#include<iostream>#define MaxSize 200using namespace std;typedef struct{ char data[MaxSize]; int length;}SqString;void StAssign(SqString& s, char data[])//string creation(字符串的建立){ int i = 0; for (; data[i] != '\0'; ++i) s.data[i] =.

2021-07-29 22:38:40 689

原创 字符串乱码情况

#include<iostream>#define MaxSize 200using namespace std;typedef struct{ char data[MaxSize]; int length;}SqString;void StAssign(SqString& s, char data[])//string creation(字符串的建立){ int i = 0; for (; data[i] != '\0'; ++i) s.data...

2021-07-28 22:05:37 288

原创 数据结构,两个记录位置变量用数组实现对栈的排序

#include<iostream>#define MaxSize 10using namespace std;typedef struct{ int data[MaxSize];}stack;class Stack{private: int top; stack st;public: Stack() { top = -1; } void Push(int a[], int n) { for (int i = 0; i < n; ++i) {.

2021-07-27 22:46:24 64

原创 数据结构栈排序

#include<iostream>#define MaxSize 10using namespace std;#include<ctime>typedef struct node{ int data[MaxSize]; int top;}SqStack;class Stack{public: void Initialization(SqStack& s) { s.top = -1; } void Push(SqStack &st,.

2021-07-27 21:35:45 184

原创 C++,如何给二重指针动态分配空间

#include<iostream>using namespace std;int main(){ int a[3][4]; for (int i = 0; i < 3; ++i) { for (int j = 0; j < 4; ++j) a[i][j] = i + j; } int** p; p = new int* [3]; for (int j = 0; j < 3; ++j) p[j] = new int[4]; for (in.

2021-07-26 21:55:45 565

原创 数据结构,简单模拟看病情况

#include<iostream>#include<string>using namespace std;#include<fstream>typedef struct node//information contained in each patient(每个病人所包含的信息){ string name;//姓名 int sex;//性别 int no;//medical record number(病历号) node* next;}node;.

2021-07-25 22:36:51 200

原创 数据结构,超出范围的极大整数相加

#include<iostream>using namespace std;typedef struct node{ int data; node* next;}node;class Operator{public: void Establish(node *&head,char a[], int n)//establishment of linked list(链表的建立) { //head insertion(用头插法) head = new node.

2021-07-21 22:46:05 172

原创 数据结构两个多项式相加结果

#include<iostream>using namespace std;typedef struct{ double coefficient; int index;}PloynomialArray;typedef struct element{ double coefficient;//系数 int index;//指数 element* next;//a pointer to the next data(连接下一个数据的指针)}element;class Plo.

2021-07-19 23:00:26 1158 2

原创 数据结构,多个集合的交并差运算

#include<iostream>#include<string>using namespace std;typedef struct node{ int data;//数据 node* next;//连接下一个节点的指针}node;typedef struct Head{ node* head;//头指针 int n;//每个集合中元素的个数}Head;class List{private: int total;//总集合数public: v.

2021-07-19 18:38:29 754

原创 希尔排序,C++

#include<iostream>using namespace std;void sort(int a[], int n)//递增排序{ int d = n / 2;//间距 int i;//未排序好的数组位置 int j;//已排序好的数组位置 for (; d > 0; d = d / 2) { for (i = d; i < n; ++i) { int temp = a[i]; //当i前面的数都比j大,将j向后移,直到遇到比它小的,遇到.

2021-07-19 00:05:47 29

原创 直接插入排序

#include<iostream>using namespace std;int main(){ int a[9] = { 132,24,123,321,2,7,4,9,0 }; int temp; int j; for (int i = 1; i < 9;++i)//未排序的区域 { temp = a[i];//要排序的元素 //将已经排序好的元素区域与未排好的元素比较,排好元素的末端在未排好元素始端的下一位 //当不符合排序条件则将已排好的区域与要插的元.

2021-07-18 23:31:04 35

原创 链栈的基本操作

#include<iostream>using namespace std;typedef struct node{ int data; node* next;}node;class Stack{private: node* s;//栈指针public: Stack() { s = new node; s->next = NULL; } void Push() { int n; cout << "结点数" << en.

2021-07-18 15:17:44 35

原创 顺序栈的基本操作

#include<iostream>using namespace std;#define MaxSize 20typedef struct{ int data[MaxSize]; int top;}SqStack;class Stack{private: SqStack* s;public: Stack() { s = new SqStack;//初始化栈指针 s->top = -1;//栈顶刚开始为空 } void Push(int data[.

2021-07-18 13:00:05 31

原创 将两个链表合成一个链表

方法1#include<iostream>using namespace std;class List{private: typedef struct node { int data; node* next; }node; node* L1, * L2, * L3;//L1,L2合成L3 node* R1, * R2;public: List()//采用尾插法初始化各指针 { L1 = new node; L1->next = NULL

2021-07-12 21:49:52 1340

原创 为啥动态分配数组的好处

#include<iostream>using namespace std;int main(){ //定长数组 //平时我们定义数组的时候是这样的 int a[10]; int n; cout << "输入数组个数" << endl; cin >> n; cout << "输入数组元素" << endl; //当输入n=4时有6个空间没用浪费了,输入11时数组长度又超出了 //所以这种定长数组不好用,所以出现.

2021-07-04 16:57:54 341

原创 C++ VS2019 缓存区溢出和读取数据无效的警告

#include<iostream>using namespace std;void test(int n){ int* nums = new int[n]; nums[0] = 1; nums[4] = 2;}int main(){ int n = 5; test(n); return 0;}警告的原因:你事先未知数组的大小就给数组的某一个位置就赋值了,如果它没这个位置呢?nums[0]不警告因为任何长度数.

2021-07-04 10:20:21 1878 2

原创 顺序表二分查找

#include<iostream>using namespace std;void BinarySearch(int a[],int n){ int target; cout << "输入要查找的值" << endl; cin >> target; int low=0, high=n-1;//位于要查找区间的最低和最高位 int mid;//高位和低位的中值 int index = -1;//要查找点的位置 while (low &lt.

2021-07-03 22:32:59 122

原创 单链表的插入

#include<iostream>using namespace std;typedef struct node{ int data; node* next;};class List{private: node* head, * last;public: List()//初始化 { head = new node; head->next = NULL; last = head; } void CreateList()//链表创建 { co.

2021-07-03 22:10:36 88

原创 斐波那契数列

递归#include<iostream>using namespace std;int Operation(int n){ if (n == 0) { return 0; } else if (n == 1) { return 1; } else { return Operation(n - 1) + Operation(n - 2); }}void OutCome(int a[], int n){ for (int i = 0; i <

2021-07-03 11:50:40 28

原创 单链表直接插入排序C++

#include<iostream>using namespace std;typedef struct node{ int data; node* next;};class List{private: node* head, * last;public: List()//初始化 { head = new node; head->next = NULL; last = head; } void CreateList()//链表创建 { co.

2021-07-03 03:35:23 645

原创 链式队列的入队和出队

#include<iostream>using namespace std;typedef struct node{ int data; node* next;};class Queue{private: node* front, * rear;public: Queue() { front = new node; front->next = NULL; rear = front; } void EnQueue() { cout &.

2021-07-03 03:02:50 747

原创 C/C++简单实现无向图的邻接矩阵

#include<iostream>using namespace std;#define MaxSize 10class graph{private: int VertexNum;//点的个数 int EdgeNum;//边得个数 char data[MaxSize];//用一维数组来存各图顶点的数据,如果数据多的话可以改为结构体 int a[MaxSize][MaxSize];//二维数组存顶点与顶点之间的关系public: graph()//初始化图 { Ve.

2021-07-02 03:10:28 655

原创 C/C++简单数据结构实现学校人事管理系统,增删改查

#include<iostream>#include<fstream>#include<string>#include<iomanip>//此处用处不大只是填充星号using namespace std;class Infor{private: typedef struct { string name;//姓名 int sex;//性别 int number.

2021-07-02 03:05:28 846

原创 C/C++有向图的邻接表

#include<iostream>#include<string>#define MaxSize 10using namespace std;class Graph{private: struct Edge { int end;//终点位置 struct Edge* next; }; struct Vertex { string Infor;//信息 struct Edge* FirstNode; }; struct Vertex v[M.

2021-07-02 02:59:33 248

原创 C/C++单链表基准拆分

#include<iostream>using namespace std;class List{private: typedef struct list { int data; list *next; }*PList; PList head, last;//头和尾指针public: List()//初始化头和尾指针 { head = new list; head->next = NULL; last = head; } void Cre.

2021-06-28 23:50:57 798 1

原创 2021-06-28

##c/c++ 顺序表的简单插入删除`#includeusing namespace std;#define MaxSize 100class SqList{private:typedef struct{char data[MaxSize];//数据元素int num;//数据个数}List,*PList;PList L;public:SqList()//顺序表初始化{ L = new List;}~SqList()//释放顺序表{ delete L;}void

2021-06-28 20:56:05 33

空空如也

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

TA关注的人

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