⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 l1.cpp

📁 创建结构体
💻 CPP
字号:
#include<iostream.h>
#include<string.h>
struct student
{
	int num;
	char name[20];
	struct birthday
	{
		int year,month,date;
	}day;

};
void main()
{
	student lhzh={20060144,"liyuya",1988,10,14};
	
	cout<<lhzh.name<<'\t'<<lhzh.num<<endl;
	cout<<lhzh.day.year<<'\t'<<lhzh.day.month<<'\t'<<lhzh.day.date<<'\n';
	cout<<sizeof(student)<<'\n';
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -