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

📄 cpp01.cpp

📁 C++参考书
💻 CPP
字号:

// Coded by plusir -- Dec.29.2002.
// Standard C++ Bible -- (P247-9-1)

#include <iostream>
using namespace std ;

struct Date
{
	int month ;
	int day ;
	int year ;
} ;

void display( const Date &dt )
{
	static char *mon[] = {
		"January",
		"February",
		"March",
		"April",
		"May",
		"June",
		"July",
		"August",
		"September",
		"October",
		"November",
		"December"
	} ;

	cout << mon[dt.month - 1] << ' ' << dt.day << ", " << dt.year << endl ;
}

int main()
{
	Date birthday = { 4, 6, 1961 } ;
	cout << "Alan's date of birth is " ;
	display( birthday ) ;

	return 0 ;
}

⌨️ 快捷键说明

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