📄 homework.cpp
字号:
#include <iostream>
#include <string>
#include <cstdlib>
#include <cstdio>
#include "homework.h"
using namespace std;
homework::homework ()
{
name = "";
assigned_date = date();
due_date = date();
}
homework::homework (string name, date assigned_date, date due_date)
{
this->name = name;
this->assigned_date = assigned_date;
this->due_date = due_date;
}
int homework::compareTo (homework another_homework)
{
int dateBool = this->due_date.compareTo(another_homework.due_date);
return dateBool;
}
ostream &operator<< (ostream &stream, homework h)
{
return stream<<h.name<<" : "<<h.assigned_date<<"-"<<h.due_date;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -