摘要: 字符串常量 #include<stdio.h> int main() { //1.每个字符串都是一个地址,这个地址是字符串首元素的地址 //2.字符串常量放在data区,文字常量区 printf("s1 = %s\n", "hello mike"); printf("s1 = %p\n", "hel 阅读全文
posted @ 2022-03-20 12:15 W-forever 阅读(225) 评论(0) 推荐(0)
摘要: 指针数组 : 存放指针的数组 int main() { int arr[10]; //整形数组 int* arr2[5]; //(整形)指针数组 -->变量名是arr2类型是 int* [5] return 0; } 数组指针 :指向数组的指针 int main() { int arr[10] = 阅读全文
posted @ 2022-03-20 12:12 W-forever 阅读(50) 评论(0) 推荐(0)
摘要: const修饰字符指针 const修饰字符指针的三种情况 const char* p ; char const* p; char* const p; const出现在*p前面(第1,2两种情况) 表示对p来说p被解引用的内容不可改,即p指向的内容无法被修改 const 出现在字符指针前表示字符指针的 阅读全文
posted @ 2022-03-20 11:29 W-forever 阅读(70) 评论(0) 推荐(0)
摘要: #include<iostream> #include<string> #include<vector> #include<numeric> #include<list> #include<functional> using namespace std; /* 到目前为止,我们使用的对象都有严格的生 阅读全文
posted @ 2022-03-20 08:04 W-forever 阅读(60) 评论(0) 推荐(0)