#include<iostream>
using namespace std;
typedef struct{
char c;
int i;
float f;
double d;
}str;
int main(){
str str1, str2;
str *p=&str2;
str1.c='chy';
str1.d=10.0;
str1. f =12;
str1.i=9;
p->c='chy2';
p->d=123;
p->f=1234;
p->i =9;
}
结构体的简单使用
最新推荐文章于 2020-12-23 21:31:16 发布