摘要: int len = sizeof(arr) / sizeof(int);void bubbleSort(int* arr, int len) //int * arr 也可以写为int arr[]{ for (int i = 0; i < len - 1; i++) { for (int j = 0; 阅读全文
posted @ 2022-04-17 12:12 cherrylen 阅读(53) 评论(0) 推荐(0)
摘要: 空指针 NULL; //const修饰的是指针,指针指向可以改,指针指向的值不可以更改 const int* p1 = &a; p1 = &b; //正确 //*p1 = 100; 报错 //const修饰的是常量,指针指向不可以改,指针指向的值可以更改 int* const p2 = &a; // 阅读全文
posted @ 2022-04-17 11:00 cherrylen 阅读(20) 评论(0) 推荐(0)