📄 usetime.cpp
字号:
// usetime.cpp -- using the fourth draft of the Time class
// comile usetime.cpp and mytime.cpp together
#include <iostream>
#include "mytime.h"
int main()
{
using std::cout;
using std::endl;
Time aida(3,35);
Time tosca(2,48);
Time temp;
cout<<"Aida and Tosca:\n";
cout<<aida<<"; "<<tosca<<endl;
temp = aida + tosca; // operator+()
cout<<"Aida + Tosca: "<<temp<<endl;
temp = aida * 1.17; // member operator * ()
cout<<"Aida * 1.17: "<<temp<<endl;
cout<<"10 * Tosca: "<<10 * tosca<<endl;
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -