Fork me on GitHub
摘要: 定义:int **p; 实例: #include<stdio.h> #include<iostream> int main() { char* str[] = { "hello","hi","nihao" }; char** p; for (int i = 0; i < 3; i++) { //指针 阅读全文
posted @ 2019-12-31 20:13 西西嘛呦 阅读(319) 评论(0) 推荐(0)
摘要: 什么是指针数组? 一个数组,里面存放的元素均为指针类型数据,被称为指针数组。 其定义形式? int *name[4]; 基本实例一:利用数组初始化指针数组 #include<stdio.h> #include<iostream> #include<string.h> int main() { int 阅读全文
posted @ 2019-12-31 19:22 西西嘛呦 阅读(785) 评论(0) 推荐(0)
摘要: 函数指针:是指向函数的指针变量,因而函数指针本身应该是指针变量,只不过指针变量指向函数。 指针函数:带指针的函数,即本质是一个函数。 函数指针实例: #include<stdio.h> #include<iostream> int max(int, int); int min(int, int); 阅读全文
posted @ 2019-12-31 18:29 西西嘛呦 阅读(709) 评论(0) 推荐(0)
摘要: 右键点击项目名,找到属性,找到c/c++,打开预处理,在预处理定义中加入:_CRT_SECURE_NO_WARNINGS 阅读全文
posted @ 2019-12-31 18:28 西西嘛呦 阅读(447) 评论(0) 推荐(0)