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

📄 c9-1-2.cpp

📁 这我们老师对是面向对象程序设计(清华大学出版社)一书制作的PPT
💻 CPP
字号:
#include <iostream>
using namespace std;

class Time
 {public:
   Time();
   void show_time();
  private:
   int hour;
   int minute;
   int sec;
 };

Time::Time()
 {
  hour=0;
  minute=0;
  sec=0;
 }

int main()
 {
  Time t1;
  t1.show_time();
  Time t2;
  t2.show_time();
  return 0;
 }
 
void Time::show_time()
 {
  cout<<hour<<":"<<minute<<":"<<sec<<endl;
 }
 
 

⌨️ 快捷键说明

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