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

📄 datetime.h

📁 标准C++编写的小小CRM软件,无任何平台依赖.采用标准XML作为数据库.只需重新纺译,可在任何平台上运行.目前测试过在GCC和VC下都可以编译通过
💻 H
字号:
// DateTime.h: interface for the DateTime class.
//
//////////////////////////////////////////////////////////////////////

#include <iostream>
#include <strstream>
#include "Date.h"
#include "Time.h"

using namespace std;


class DateTime 
{
	friend istream& operator >> ( istream& is,DateTime& dt );
	friend ostream& operator << ( ostream& os,DateTime& dt );
public:
	DateTime();	
	DateTime(unsigned year,unsigned month,unsigned day,
		unsigned hour,unsigned minute,unsigned second);
	DateTime( const Date& date, const Time& time );	
	DateTime( char *dt );
	virtual ~DateTime();
public:
	const Date& getDate()	{	return date;	}
	const Time& getTime()	{	return time;	}
	bool operator == ( const DateTime& dt );	// check the first DateTime equal to the other.
	bool operator >  ( const DateTime& dt );	// check the first DateTime later than the follow
	bool operator <  ( const DateTime& dt );	// check the first DateTime earlier than the follow	
private:
	Time time;
	Date date;
};
istream& operator >> ( istream& is,DateTime& dt );
ostream& operator << ( ostream& os,DateTime& dt );

⌨️ 快捷键说明

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