摘要:
file1:array.h #pragma once #ifndef _ARRAY_H_#define _ARRAY_H_ const int BLOCK_SIZE = 20;typedef struct { int *array; int size;}Array; Array array_crea 阅读全文
posted @ 2021-12-27 13:38
江南王小帅
阅读(54)
评论(0)
推荐(0)
摘要:
//联和 // union #include<stdio.h> #pragma warning(disable : 4996) typedef union AnEit{ int i; char ch[sizeof(int)];}chI; int main(){ chI chi; int i; chi 阅读全文
posted @ 2021-12-27 11:25
江南王小帅
阅读(46)
评论(0)
推荐(0)
摘要:
//自定义数据类型// typedef #include<stdio.h> #pragma warning(disable : 4996) typedef int Length; //Length 成为int 别名 //用Date 替代 struct Adate typedef struct Ada 阅读全文
posted @ 2021-12-27 11:15
江南王小帅
阅读(53)
评论(0)
推荐(0)
摘要:
//指向结构的指针 #include<stdio.h> #pragma warning(disable : 4996) struct date{ int mounth; int day; int year; }myDay; int main(){ struct date *p = &myDay; ( 阅读全文
posted @ 2021-12-27 10:47
江南王小帅
阅读(113)
评论(0)
推荐(0)
摘要:
//结构体类型 // #include<stdio.h> #pragma warning(disable : 4996) struct point{ int x; int y;}; int main(){ struct date { int month; int day; int year; }; 阅读全文
posted @ 2021-12-27 10:10
江南王小帅
阅读(98)
评论(0)
推荐(0)
摘要:
//结构体类型 // #include<stdio.h> #pragma warning(disable : 4996) struct point //声明结构类型{ int x; int y;}; int main(){ struct date //声明结构类型 { int month; int 阅读全文
posted @ 2021-12-27 10:00
江南王小帅
阅读(111)
评论(0)
推荐(0)
摘要:
//枚举是一种用户定义的数据类型,他用关键字enum 来声明; //枚举量可以作为值,只能是整数 //实际上是以整数来做内部运算和外部输出的 #include<stdio.h> #pragma warning(disable : 4996) enum color {red =3 ,yellow,gr 阅读全文
posted @ 2021-12-27 09:49
江南王小帅
阅读(28)
评论(0)
推荐(0)

浙公网安备 33010602011771号