main.cpp
来自「一个APPOINMENTBOOK程序」· C++ 代码 · 共 37 行
CPP
37 行
#include <iostream>
using namespace std;
#include "AppointmentBook.h"
#include "prompt.h"
void main()
{
AppointmentBook appointment_book;
Appointment appointment, temp;
Date date;
do {
cout << endl << "Enter a new appointment" << endl;
appointment.m_strWhat = PromptString("Enter what: ");
appointment.m_strWhere = PromptString("Enter where: ");
appointment.m_date.m_iDate = PromptRange("Enter Date", 1, 31);
appointment.m_date.m_iMonth = PromptRange("Enter Month", 1, 12);
appointment.m_date.m_iYear = PromptRange("Enter Year", 1, 3000);
appointment_book.AddAppointment(&appointment);
} while (PromptYesNo("Enter More Appointments [Y/N]: "));
appointment_book.PrintAllAppointments();
do {
cout << endl << "Enter a date to print" << endl;
date.m_iDate = PromptRange("Enter Date", 1, 31);
date.m_iMonth = PromptRange("Enter Month", 1, 12);
date.m_iYear = PromptRange("Enter Year", 1, 3000);
appointment_book.PrintAppointmentsForDate(&date);
} while (PromptYesNo("Search more dates"));
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?