指针数组:

#include <stdio.h>
#include <stdlib.h>
#include <string.h> void PrintInt()
{
int x = 10,y = 20,z = 30; int *Array[] = { &x, &y, &z }; // 定义数组指针
*Array[0] = 100; // 给x重新赋值
*Array[2] = 300; // 给z重新赋值 for (int x = 0; x < 3; x++)
printf("地址: %x --> 数值:%d \n", Array[x], *(Array[x]));
} void PrintArray()
{
int x[] = { 1, 2, 3, 4, 5 };
int y[] = { 6, 7, 8, 9, 10 }; int *Array[] = { &x, &y }; // printf("%d \n", *(Array[0] + 1));
for (int x = 0; x < 2; x++)
{
for (int y = 0; y < 5; y++)
{
printf("地址: %x --> 数值: %d \n", Array[x] + y, *(Array[x] + y));
}
}
} int main(int argc, char* argv[])
{
PrintArray(); system("pause");
return 0;
}

指针取步长:

#include <stdio.h>
#include <stddef.h>
#include <stdlib.h> struct Person
{
int num;
char name[64];
int age;
}; int main(int argc, char* argv[])
{
char buf[100] = { 0 };
int num = 100;
// 在buf+1的位置拷贝字符串.
memcpy(buf + 1, &num, sizeof(int)); char *ptr = buf;
// (int *) => 取多少个字节 / ptr+1 遍历到下一个数据上
int tmp = *(int *)(ptr + 1);
printf("取出buf里面的int数据: %d \n", tmp); struct Person sp = { 1, "lyshark", 22 };
printf("age相对于Person首地址偏移量: %d\n", offsetof(struct Person, age)); // 定位到age的内存: (char *)&p + offsetof(struct Person,age)
// 整体括起来取首地址: ((char *)&p + offsetof(struct Person,age))
// 强制取出四字节数据: (int *)((char *)&p + offsetof(struct Person,age)) int struct_age = *(int *)((char *)&sp + offsetof(struct Person, age));
printf("结构体中age的数据是: %d \n", struct_age); system("pause");
return 0;
}

指针间接赋值:

#include <stdio.h>
#include <stddef.h>
#include <stdlib.h> void ChangeValue(int *p)
{ // 改变某个值
(*p) = 200;
} void ChangePointer(int **val)
{ // 改变指针的值
*val = 0x08;
} int main(int argc, char* argv[])
{
int num = 100;
ChangeValue(&num);
printf("改写后的数值: %d 当前地址: %x \n", num,&num); int *p = NULL;
ChangePointer(&p);
printf("当前p地址: %x \n", p); system("pause");
return 0;
}

指针做函数参数: 指针的输入和输出特性

#include <stdio.h>
#include <stdlib.h> void Print(const char *str)
{
printf("输出指针内容: %s \n", str + 2);
} int main(int argc, char* argv[])
{
char *ptr = malloc(sizeof(char)* 100);
memset(ptr, 0, 100); // 初始化内存 strcpy(ptr, "hello lyshark");
Print(ptr); system("pause");
return 0;
}
#include <stdio.h>
#include <stdlib.h> void Print(char **Array,int len)
{
// Array[0] = *(Array +0)
for (int x = 0; x < len; x++)
{
printf("首地址: 0x%x 参数: %s \n", *(Array + x),Array[x]);
}
} int main(int argc, char* argv[])
{
char *str[] = { "admin", "guest", "lyshark", "root" }; int str_len = sizeof(str) / sizeof(str[0]);
Print(str, str_len); system("pause");
return 0;
}

指针做函数参数: 输出特性

#include <stdio.h>
#include <stdlib.h> void allocateSpace(char **tmp)
{
char *p = malloc(100);
memset(p, 0, 100);
strcpy(p, "hello lyshark");
*tmp = p; // 将指针甩出去
} int main(int argc, char* argv[])
{
char *p = NULL;
allocateSpace(&p); printf("输出数据: %s", p); if (p != NULL)
{
free(p);
p = NULL;
} system("pause");
return 0;
}

堆指针分配:

#include <stdio.h>
#include <stdlib.h> int main(int argc, char* argv[])
{
int *p = calloc(10, sizeof(int));
for (int x = 0; x < 10; x++)
{
p[x] = x + 1;
} for (int x = 0; x < 10; x++)
printf("%d \n", p[x]); if (p != NULL)
{
free(p);
p = NULL;
} system("pause");
return 0;
}

Realloc:

#include <stdio.h>
#include <stdlib.h> int main(int argc, char* argv[])
{
int *p = malloc(sizeof(int)* 10); // 分配空间 for (int x = 0; x < 10; x++)
{
p[x] = x;
printf("%d \n", p[x]);
} int old_ptr = p;
p = realloc(p, sizeof(int)* 20);
int new_ptr = p; // realloc 函数追加空间,如果空间够用则直接追加.
// 如果空间不够用了,那么将会重新分配一块空间,并将原数据拷贝到新的地址上
// 随后会自动释放旧的空间
if (old_ptr != new_ptr)
printf("原始空间: 0x%x 新空间: 0x%x \n", old_ptr, new_ptr);
else
printf("原始空间: 0x%x 够用,并没有发生变化.\n"); system("pause");
return 0;
}

const 使用场景 高效传递,一般为了高效,我们使用地址传递,这样就无须重复拷贝了。

#include <stdio.h>
#include <stdlib.h> struct Student
{
int num;
char *name;
}; void MyPrint(const struct Student *stu)
{ // const 常量无法修改了,适合于打印数据,骚操作可以修改
struct Student *p = (struct Student *)stu;
p->num = 100; printf("内部的打印: %d \n", stu->num);
} int main(int argc, char* argv[])
{
struct Student stu = { 1, "lyshark" };
// 传递指针要比传递参数效率更高 MyPrint(stu) --> MyPrint(&stu);
MyPrint(&stu);
printf("外部的打印: %d \n", stu.num); system("pause");
return 0;
}

多级指针:

#include <stdio.h>
#include <stdlib.h>
#include <string.h> int main(int argc, char* argv[])
{
int num = 10; int *ptr = &num; int **ptr1 = &ptr; **ptr1 = 12; printf("%d", **ptr1);
system("pause");
return 0;
}

二级指针(输出特性1):

#include <stdio.h>
#include <stdlib.h> void allocateSpace(int **tmp)
{
int * arr = malloc(sizeof(int)* 10);
for (int x = 0; x < 10; x++)
arr[x] = x; // 指针间接赋值
*tmp = arr;
} void PrintArray(int *tmp)
{
for (int x = 0; x < 10; x++)
printf("%d ", tmp[x]);
} void freeSpace(int **tmp)
{
free(*tmp);
*tmp = NULL;
tmp = NULL;
} int main(int argc, char* argv[])
{
int *pArray = NULL; allocateSpace(&pArray);
PrintArray(pArray); freeSpace(&pArray); if (pArray == NULL)
printf("已释放,被掏空 \n"); system("pause");
return 0;
}

二级指针做函数参数 输入特性1

#include <stdio.h>
#include <stdlib.h> void PrintArray(const int **tmp)
{
for (int x = 0; x < 10; x++)
{
printf("%d ", *tmp[x]);
}
} int main(int argc, char* argv[])
{
int ary[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; // 堆区分配指针,接收指针(地址)的指针
int **pArray = malloc(sizeof(int *)* 10); for (int x = 0; x < 10; x++)
//pArray[x] = &ary[x];
*(pArray + x) = &ary[x]; PrintArray(pArray); system("pause");
return 0;
}

二级指针做函数参数 输入特性2

#include <stdio.h>
#include <stdlib.h> void PrintArray(const int **tmp)
{
for (int x = 0; x < 10; x++)
{
printf("%d ", *tmp[x]);
}
} int main(int argc, char* argv[])
{ int **pArray = malloc(sizeof(int *)* 10); for (int x = 0; x < 10; x++)
{
pArray[x] = malloc(4); // 动态开辟整数空间
*(pArray[x]) = x; // 动态赋值
} PrintArray(pArray); // 释放堆内存
for (int x = 0; x < 10; x++)
{
if (pArray[x] != NULL)
{
free(pArray[x]); // 释放小的空间
pArray[x] = NULL;
} free(*pArray); // 把最后的干了
*pArray = NULL;
} system("pause");
return 0;
}
#include <stdio.h>
#include <stdlib.h> int main(int argc, char* argv[])
{
char *p[] = { "package", "housing", "pace", "unleash" }; char **cp = (char **)malloc(sizeof(char*)* 4); for (int x = 0; x < 4; x++)
{
cp[x] = (char*) malloc(10 * sizeof(char));
sprintf(cp[x], "%s", p[x]);
} for (int x = 0; x < 4; x++)
{
printf("输出堆数据: %s \n", *cp);
cp++;
} system("pause");
return 0;
}

文件读取 新建一个文本,里面有几行数据,我们根据数组中的行数动态开辟内存空间,并且字符串长度是多长就分配多长的空间。

#include <stdio.h>
#include <stdlib.h> // 获取文件的总行数
int GetFileLine(FILE *fp)
{
if (fp == NULL) return -1; char buf[1024] = { 0 };
int line = 0;
while (fgets(buf,1024,fp) != NULL)
{
++line;
}
// 恢复指针起始位置
fseek(fp,0,SEEK_SET);
return line;
} int ReadFileData(FILE *fp,int line,char **pContent)
{
char buf[1024] = { 0 };
int index = 0; while (fgets(buf, 1024, fp) != NULL)
{
int curLineLen = strlen(buf) + 1; // 获取每行数据长度
//printf("读取到每行数据: %s", buf);
// 给当前行分配内存
char * lineContent = malloc(sizeof(char)* curLineLen); strcpy(lineContent, buf);
pContent[index++] == lineContent; memset(buf, 0, 1024);
}
} void ShowFileContent(char **pContent, int line)
{
for (int i = 0; i < line; i++)
{
printf("%d %s", i, pContent[i]);
}
} int main(int argc, char* argv[])
{ FILE *fp = fopen("c:/Recovery.txt", "r");
int line = GetFileLine(fp);
// 分配的行数取决于文件行数
char **pContent = malloc(sizeof(char*)* line); // 读取文件内容
ReadFileData(fp, line, pContent); // 输出文件内容
ShowFileContent(pContent, line); system("pause");
return 0;
}

普通数组

#include <stdio.h>
#include <stdlib.h> void PrintArray(int *Array, int len)
{
for (int x = 0; x < 10; x++)
{
printf("%d \n", Array[x]);
printf("%d \n", *(Array + x));
}
} int main(int argc, char* argv[])
{
int Array[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; // PrintArray(Array, 10); system("pause");
return 0;
}

指针运算

#include <stdio.h>
#include <stdlib.h>
#include <string.h> int main(int argc, char* argv[])
{ int Array[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; int *ptr = Array; ptr = &Array[10]; int len = ptr - Array; printf("%d", len); system("pause");
return 0;
}

定义指向数组的指针

#include <stdio.h>
#include <stdlib.h> int main(int argc, char* argv[])
{
// 数组指针类型
typedef int (Array_Type)[10]; Array_Type MyArray; // => int myarray[10];
for (int x = 0; x < 10; x++)
{
MyArray[x] = x;
// printf("%d ", MyArray[x]);
}
// 定义数组指针,指向整个数组的指针
Array_Type *pArray = &MyArray; // pArray 指向了整个数组,如何遍历 ?
for (int x = 0; x < 10; x++)
{
int num = *(*pArray + x);
printf(" -> %d ", num);
} // 2.直接定义数组指针类型,并指向数组
int Array[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; typedef int(*Array_Point)[5]; // 直接定义指针类型
Array_Point pArray_Point = &Array; // 3.直接定义数组指针变量
int(*pArray_Param)[10] = &Array;
for (int x = 0; x < 10; x++)
{
printf("%d ", *(*pArray_Param + x));
} system("pause");
return 0;
}

多维指针定义数组:

#include <stdio.h>
#include <stdlib.h> void PrintArray(int(*Array)[3],int row,int col)
{
for (int x = 0; x < row; ++x)
{
for (int y = 0; y < col; ++y)
{
// printf("%d ", *(*(Array + x) + y));
printf("%d ", Array[x][y]);
}
}
} int main(int argc, char* argv[])
{
int Array[2][3] = {{ 1, 2, 3 },{ 4, 5, 6 }}; int(*pArray) = Array;
//printf("%d ", (*pArray + 0)) => 1;
//printf("%d ", (*pArray + 1) + 2 ) => 4; for (int x = 0; x < 3; x++)
{
printf("%d", ((*pArray + x) + 3));
} PrintArray(Array,2,3); system("pause");
return 0;
}

指针选择排序:

#include <stdio.h>
#include <stdlib.h>
#include <string.h> void PrintArray(char **Array,int len)
{
for (int x = 0; x < len; ++x)
printf("%s \n", Array[x]);
} void SelectSort(char **Array, int len)
{
for (int x = 0; x < len; ++x)
{
int min = x;
for (int y = x + 1; y < len; ++y)
{
if (strcmp(Array[y], Array[min]) < 0)
min = y;
} if (min != x)
{
char *tmp = Array[min];
Array[min] = Array[x];
Array[x] = tmp;
}
}
} int main(int argc, char* argv[])
{
char *pArray[] = { "ddd", "bbb","sss", "qqq", "yyy", "eee", "ooo" }; int len = sizeof(pArray) / sizeof(char *);
SelectSort(pArray, len); PrintArray(pArray, len); system("pause");
return 0;
}

void 万能指针

#include <stdio.h>
#include <stdlib.h>
#include <string.h> int main(int argc, char* argv[])
{
// 万能指针,必须经过转换才可使用
int number = 10;
void *int_ptr = &number; // 万能指针
*(int *)int_ptr = 100; // 赋值必须进行强转(告诉他需要读取多大的字节)
printf("number => %d Address: %x \n", number,int_ptr); // --------------------------------------------------------------------
// 针对数组类型的万能指针 int Array[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
void *array_ptr = Array; // 赋值一个空指针 *(int *)array_ptr = 100; // 改变第一个值
*((int *)array_ptr + 1) = 200; // 改变第二个值 for (int x = 0; x < 10; x++)
printf("%d ", Array[x]); system("pause");
return 0;
}

指针数组排序:

#include <stdio.h>
#include <stdlib.h>
#include <string.h> void Bubble(int *Array, int len)
{
for (int x = 0; x < len - 1; x++)
{
for (int y = 0; y < len - 1 - x; y++)
{
if (*(Array + y) > *(Array + y + 1))
{
int tmp = *(Array + y);
*(Array+y) = *(Array + y + 1);
*(Array + y + 1) = tmp;
}
}
} } int main(int argc, char* argv[])
{
int Array[10] = { 4,7,8,2,1,8,9,3,4,10 };
int len = sizeof(Array) / sizeof(Array[0]);
int *ptr = Array; Bubble(ptr, len); for (int x = 0; x < 10; x++)
{
printf("%d ", *(ptr+x));
} system("pause");
return 0;
}

野指针

#include <stdio.h>
#include <stdlib.h>
#include <string.h> int main(int argc, char* argv[])
{
int a = 100; int *p = &a; p = 0xffff; *p = 200; system("pause");
return 0;
}

指向函数的指针(函数指针):

#include <stdio.h>
#include <string.h> int MyPrintA(int x,int y)
{
printf("MyPrintA --> %d --> %d \n", x, y);
return 1;
} int main(int argc, char* argv[])
{
printf("函数名入口: %d \n", &MyPrintA); // 直接定义并调用函数指针
int *FuncAddr = (int *) &MyPrintA; // 获取函数地址
int(*MyFunc)(int,int) = FuncAddr; // 定义函数指针
int result = MyFunc(10,20); // 调用函数指针 // 定义函数类型,并通过类型定义函数指针
typedef int(Func_Type)(int, int); // 先定义类型
Func_Type *pFunc = MyFunc; // 定义函数指针
pFunc(100, 200); // 调用(1)
(*pFunc)(1000, 2000); // 调用(2) // 直接定义函数类型,并使用(1)
typedef int(*Func_Ptr)(int, int);
Func_Ptr pFunc2 = MyFunc;
pFunc2(10000, 20000);
// 直接定义函数类型,并使用(2)
int(*pfunc)(int, int) = NULL;
pfunc = MyFunc;
pfunc(100000, 200000); // 如果拿到了一个地址,我们该如何将其转换为函数指针,并调用?
// 此处应该关闭基址随机化 ASLR
printf("函数名入口: %x \n", &MyPrintA);
// (int (*)(int, int)) 0x4110e6;
int(*Print)(int, int) = 0x4110e6; // 转换为函数指针 MyPrintA
Print(1, 2); // 直接调用 system("pause");
return 0;
}

函数指针实现动态参数调用

#include <stdio.h>

int Func1(int x, int y)
{
return x + y;
} int Func2(int x, int y)
{
return x - y;
} void MyPrintA()
{
// 只需要让指针指向不同的函数,就可以完成多态调用.
int(*pFunc)(int, int) = Func1; // 此处可以动态修改
int ret = pFunc(1, 2);
printf("Func1 = > %d \n", ret);
}

普通的函数指针参数传递: 实现了动态的参数传递,与函数传递,函数定制功能

#include <stdio.h>

int Func1(int x, int y)
{
return x + y;
} int Func2(int x, int y)
{
return x - y;
}
// 函数可以作为另外一个函数的参数
void doLogic(int(*pFunc)(int, int))
{
int x = 10, y = 5; int ret = pFunc(x, y);
printf("doLogic --> %d \n", ret);
} int main(int argc, char* argv[])
{
doLogic(Func2); system("pause");
return 0;
}

函数指针数组 使用函数指针数组,实现一批相同调用规则的函数进行运算。

#include <stdio.h>

int add(int x, int y)
{
int result = x + y;
printf("x + y => %d ", result);
return result;
} int sub(int x, int y)
{
int result = x - y;
printf("x - y => %d ", result);
return result;
} int mul(int x, int y)
{
int result = x * y;
printf("x * y => %d ", result);
return result;
} int main(int argc, char* argv[])
{
int(*func_array[3])(int,int); // 定义函数指针数组 func_array[0] = add; // 分别给与不同的函数地址
func_array[1] = sub;
func_array[2] = mul; for (int x = 0; x < 3; x++)
{
int z = func_array[x](100,20);
printf(" -> %d \n", z);
} system("pause");
return 0;
}

函数指针做函数参数,回调函数

#include <stdio.h>

// 输出数组中的数据。
void Print_Array(void *Array, int eleSize, int len, void(*print)(void *))
{
char *start = (char *)Array;
for (int x = 0; x < len; ++x)
{
//printf("数据: %d \n", start + x * eleSize);
print(start + x * eleSize);
}
} // 这是回调函数
void MyPrint(void *recv)
{
int *ptr = (int*)recv;
printf("回调函数 --> 输出地址: %x --> 数据: %d \n", ptr,*ptr);
} void MyPrintPerson(void *recv)
{
struct Person *stu = (struct Person *)recv;
printf("回调函数 --> 输出地址: %x \n", stu);
} int main(int argc, char* argv[])
{
int arry[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
Print_Array(arry, sizeof(int), 10, MyPrint);
// --------------------------------------------------------------------
struct Person
{
char name[64];
int age;
}; struct Person stu[] = { { "admin", 22 }, { "root", 33 } };
Print_Array(stu, sizeof(struct Person), 2, MyPrintPerson); system("pause");
return 0;
}

C/C++ 操作数组与指针笔记的更多相关文章

  1. 小猪猪C++笔记基础篇(四)数组、指针、vector、迭代器

    小猪猪C++笔记基础篇(四) 关键词:数组,Vector. 一.数组与指针 数组相信大家学过C语言或者其他的语言都不陌生,简单的就是同一个变量类型的一组数据.例如:int a[10],意思就是从a开始 ...

  2. C语言学习笔记之成员数组和指针

    成员数组和指针是我们c语言中一个非常重要的知识点,记得以前在大学时老师一直要我们做这类的练习了,但是最的还是忘记了,今天来恶补一下.     单看这文章的标题,你可能会觉得好像没什么意思.你先别下这个 ...

  3. C语言数组和指针的理解_在取地址运算上的操作_指针加减操作_a 和&a 的区别

    1.一个实例+理论分析 在了解数组和指针的访问方式前提下,下面再看这个例子: main() { int a[5]={1,2,3,4,5}; int *ptr=(int *)(&a+1); pr ...

  4. C Primer Plus学习笔记(九)- 数组和指针

    数组 数组由数据类型相同的同一系列元素组成 需要使用数组时,通过声明数组告诉编译器数组中内含多少元素和这些元素的类型 普通变量可以使用的类型,数组元素都可以用 float candy[365]; // ...

  5. 对二维数组使用指针进行操作的探索(C语言)

    /* Name: 对二维数组使用指针进行操作的探索 Copyright: Author: lingr7 Date: 01/12/18 11:55 Description: */ #include< ...

  6. C语言学习笔记之数组与指针的关系

    首先,大家先需知道一个关于基类型的概念 基类型:组成一个新类型的基础类型 这句话是什么意思呢?举个例子: int a[3] = {1,2,3}; 上面是由三个int类型的数组成一个新的类型也就是数组, ...

  7. javascript 红宝书笔记之如何使用对象 如何操作数组

    对象定义  ===  引用类型,描述的是一类对象所具有的属性和方法     新对象的创建 方法     new + 构造函数       var person = new Object(); 对象字面 ...

  8. C++笔记-数组指针/二维数组转换指针

    参考资料: 1. 作者 BensonLaur  :https://www.cnblogs.com/BensonLaur/p/6367077.html 2. https://blog.csdn.net/ ...

  9. Java学习笔记十:Java的数组以及操作数组

    Java的数组以及操作数组 一:什么是数组: 数组可以理解为是一个巨大的“盒子”,里面可以按顺序存放多个类型相同的数据,比如可以定义 int 型的数组 scores 存储 4 名学生的成绩 数组中的元 ...

  10. 把《c++ primer》读薄(4-2 c和c++的数组 和 指针初探)

    督促读书,总结精华,提炼笔记,抛砖引玉,有不合适的地方,欢迎留言指正. 问题1.我们知道,将一个数组赋给另一个数组,就是将一个数组的元素逐个赋值给另一数组的对应元素,相应的,将一个vector 赋给另 ...

随机推荐

  1. 题解| CF1561D2. Up the Strip(递推)

    题目链接:Here 这个思路学习自 Harris-H ,考虑递推而不是DP 与 D1 不同,开始考虑 \(f_{i-1} \to f_i\) 显然操作 1 多了 \(f_{i-1}\) ,操作2 多了 ...

  2. Codeforces Round #713 (Div. 3) Person Editorial

    补题链接:Here 1512A - Spy Detected! 题意:找到唯一不同数的下标 复制数组然后比较 \(a_1\) int main() { ios_base::sync_with_stdi ...

  3. springboot2.0+dubbo-spring-boot-starter聚合项目打可执行的jar包

    springboot2.0+dubbo聚合项目打可执行的jar包 springboot2.0+dubbo-spring-boot-starter项目服务方打包和以前老版本的dubbo打包方式不一样,不 ...

  4. C#从字符创中分离文件路径、文件名及扩展名

    效果图 代码如下 private void btn_Openfile_Click(object sender, EventArgs e) { if (openFileDialog1.ShowDialo ...

  5. 每天学五分钟 Liunx 0010 | 软件篇: RPM 和 YUM

    1. RPM RPM(RedHat Package Manager),顾名思义是 RedHat 的软件包管理器.它遵循 GPL 规则且功能强大好用,从而逐渐运用到其它 Liunx 发行版中,包括 Fe ...

  6. APB Slave设计

    APB Slave位置 实现通过CPU对于APB Slave读写模块进行读写操作 规格说明 不支持反压,即它反馈给APB的pready信号始终为1 不支持错误传输,就是说他反馈给APB总线的PSLVE ...

  7. 15-触摸按键控制LED灯

    1.触摸按键 触摸按键可分为四大类:电阻式,电容式,红外感应式和表面声波式 电阻式触摸按键使用人体破压电阻,改变电阻,实现开关效果,耐用性差,很少使用 红外感应式是通过红外扫描的方式,一般使用在比较恶 ...

  8. 【TouchGFX】AnalogClock 小部件使用小记

  9. makefile文件详解

    1. make 编译:将源代码文件翻译成处理器可执行的二进制文件的过程,这个过程的时间区间称为编译时 构建:指定多个编译过程的先后顺序 make命令是常用的构建工具,诞生于1977年,主要用于C/C+ ...

  10. [转帖]max_allowed_packet 与 SQL 长度的关系

    https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000210013 适用版本:V2.1.x.V2.2.x.V3.1 ...