看淡生死,不服就干ios
emmmmm数组
其实今天蛮烦的 函数
高等数学考的一塌糊涂 spa
会的不会的都没写 指针
真心没有高中轻松了啊 code
也不知道本身立的flag还能不能实现 blog
既然选择了就必定坚持下去啊字符串
下面仍是放一段以前写的代码吧数学
这个代码是C和C++的混合版本string
关于兼容性的问题里面有标注
main 函数应该是被我吃了
emmmmmm 好烦
#include<iostream> #include<stdlib.h> #include<stdio.h> #include<math.h> #include<ctime> #include<cmath> #include<cstdlib> #include<cstdio> #include<iostream> #include<string.h> #include<cstring> #include<Windows.h> #include<string.h> using namespace std; void zz_first() //数字应用指针 { int * a, b=85; a = &b; cout << *a; } void zz_second()//一维数组的应用指针 { int* c, d[10] = { 1,2,3,4,5,6,7,8,9,0 },e; c = d; //c = &d[0]; 不一样的写法 for (e = 0; e < 10; e++) { cout << *(c + e)<<endl; Sleep(100); } } void zz_third()//二维数组的指针 { int* f, g[2][3] = { 1,2,3,4,5,6 },h,i; f = g[0]; //f = &g[0][0]; for (h = 0; h < 6; h++) { cout << *f++; } } //void zz_thirdt() //二维数组的指针 //{ // int i[2][3] = { 2,3,4,5,6,1 }; // int(*j)[3]; // int k, l; // for (k = 0; k < 2; k++) // { // for (l = 0; l < 3; l++) // { // printf("%d", (*(j + k) + l)); // } // } //} C++不兼容,去C实验 void zz_fourth()//字符串复习 { char a[10] = { "hello" }; printf("%s", a); } int main() { zz_third(); return 0; }