上一页 1 ··· 7 8 9 10 11 12 13 下一页
摘要: // CPPTest.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 // #include<fstream> #include <iostream> #include<string> #include<cmath> using namespace std; double 阅读全文
posted @ 2024-07-23 14:43 zhongta 阅读(17) 评论(0) 推荐(0)
摘要: 声明函数原型: double pam(int); 将函数名替换为指针: double (*pf)(int); 例: double (*pf)(int);//函数的指针 double *pf(int);//返回值为double*的函数 函数指针的声明需要注意参数相同: double ned(doubl 阅读全文
posted @ 2024-07-21 14:27 zhongta 阅读(10) 评论(0) 推荐(0)
摘要: int data[3][4]; int sum(int (*ar)[4],int size);//定义二维数组为每个一维数组长度为4的指针 int sum(int ar2[][4],int size);//同上 int a[100][4]; int b[6][4]; int total1=sum(a 阅读全文
posted @ 2024-07-19 13:47 zhongta 阅读(10) 评论(0) 推荐(0)
摘要: 1.int gorp=16; int chips=12; const int *p_snack=&gorps; *p_snack=20;//不可以更改指针常量的值 p_snack=&chips//可以,可以更改指针指向 2.int gorp=16; int chips=12; int * const 阅读全文
posted @ 2024-07-19 13:27 zhongta 阅读(30) 评论(0) 推荐(0)
摘要: // CPPTest.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 // #include <iostream> #include<string> #include <cctype> using namespace std; struct Bop { string ful 阅读全文
posted @ 2024-07-18 13:53 zhongta 阅读(10) 评论(0) 推荐(0)
摘要: short>=2字节。int >=short。long>=32或int字长 longlong >=8字节或Long int=32位(WINDOWS) 16位(-32768 +32767) 32位(2147483647) 64位(9223372036854775807) sizeof计算字节数(byt 阅读全文
posted @ 2024-07-05 15:05 zhongta 阅读(19) 评论(0) 推荐(0)
摘要: #include <iostream> #include<iomanip> #include<cmath> using namespace std; int main() { int a; cout << "please input a number:" << endl; cin >> a; int 阅读全文
posted @ 2024-06-04 15:39 zhongta 阅读(123) 评论(0) 推荐(0)
摘要: #include<stdio.h> #include<math.h> #include<string.h> #include<stdlib.h> struct Man{ int num; struct Man *next; }; void LastRemain(int num,int count); 阅读全文
posted @ 2024-05-24 16:02 zhongta 阅读(29) 评论(0) 推荐(0)
摘要: #include<stdio.h> #include<math.h> #include<string.h> struct Date{ int year; int month; int day; }; int RunYear(int year); int CountDay(struct Date da 阅读全文
posted @ 2024-05-24 15:21 zhongta 阅读(40) 评论(0) 推荐(0)
摘要: #include<stdio.h> #include<math.h> #include<string.h> int main(){ char *str="A123x456 17960? 302tab5876c12as8888aa"; CountInt(str); } void CountInt(ch 阅读全文
posted @ 2024-05-22 14:08 zhongta 阅读(14) 评论(0) 推荐(0)
上一页 1 ··· 7 8 9 10 11 12 13 下一页