强制转换为结构变量的元素
<#include <stdio.h>struct date//date是结构体名
{
int day;
int month;
int year;
};
int main(void)
{
struct date day1;
struct date day2;
day1 = (struct date) {8,11,2019};
day2 = (struct date) {8,12};
printf("Today is :%d-%d-%d\n", day1.year, day1.month, day1.day);
printf("Today is :%d-%d-%d\n", day2.year, day2.month, day2.day);
return 0;
}
> https://blog.csdn.net/blog_xu/article/details/84374473
看看这个吧,就不给你打了 lovedai 发表于 2019-11-9 23:54
https://blog.csdn.net/blog_xu/article/details/84374473
看看这个吧,就不给你打了
好的,谢谢您!
页:
[1]