原创 B-Tree的查找、插入和刪除(java實現)
一、java Bean package com.hgldp.web.pojo; import java.util.LinkedList; /** * @author hgl * @data 2018年11月3日 * @d
原创 c語言_貪喫蛇
c語言_貪喫蛇 一、Snake.h #pragma once #define WIDTH 60 #define HIGH 20 int score = 0; //偏移量 int dx = 0; int dy = 0; in
原创 c語言大文件排序
一、 生成大文件 int main(void) { FILE* fp = fopen("D:/數據.txt","w"); if (!fp) { printf("打開文件失敗/n"); return -1; }
原创 結構體所佔字節的計算
#include<stdio.h> #pragma pack(show) // 8 默認對齊模數 //對於自定義數據類型,內存對齊規則如下: //1. 從第一個屬性開始,偏移量爲0 //2. 從第二個屬性開始,地址要放在該類型的
原创 c/c++ 結構體嵌套結構體的偏移量計算
#include<stdio.h> #include<stddef.h> struct Person { char a; int b; }; struct Person2 { char c; int d; stru
原创 c/c++ 如何定義數組的指針
#include<stdio.h> #include<stdlib.h> #include<string.h> //如何定義數組的指針(三種方式) //先定義出數組的類型,再通過類型創建數組的指針 void test01()
原创 c/c++ 通過異或運算實現兩個數的交換
void test07() { int num1 = 2; int num2 = 3; printf("交換前:"); printf("num1= %d,num2 = %d\n", num1, num2); num1
原创 c/c++ 二維數組作函數的參數
#include<stdio.h> #include<string.h> #include<stdlib.h> //二維數組作函數的參數,退化成一個指向一維數組的指針變量 void printArray(int(*p)[3],
原创 c/c++ sizeof與strlen的區別
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<stddef.h> void test01() { //sizeof統計 \0,strlen不統
原创 c/c++通過地址偏移訪問或修改變量
#include<stdio.h> #include<string.h> #include<stdlib.h> typedef struct Person { char c1; int t1; char c2; int
原创 c/c++ base64加密實現
#include<iostream> #include<string> #include<bitset> #include<vector> #include<stdlib.h> #include<time.h> #include<
原创 C/C++版AES加密實現
一、參考文檔 1.https://www.jianshu.com/p/3840b344b27c?utm_campaign=maleskine&utm_content=note&utm_medium=seo_notes&utm_so
原创 c語言_二叉排序樹增刪
一、tree.h #pragma once #include<stdio.h> #include<stdlib.h> typedef struct binary_sort_tree { int* data; void* le
原创 c語言統計字符個數
1.統計各字符串出現的次數 int main(int argc, const char * argv[]) { char chs[] = "fjadsjfjdsajfkjdskj"; int arr[26] = {
原创 c語言結構體指針使用
一、代碼 #define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<string.h> #include<stdlib.h> struct student1 { ch