ładżda12
Dołączył: 06 Mar 2011
Posty: 21
Przeczytał: 0 tematów
Ostrzeżeń: 0/10
|
Wysłany: Śro 15:50, 01 Cze 2011 Temat postu: dgerg |
|
|
#include <cstdlib>
#include <iostream>
using namespace std;
class Date
{
public:
Date(){};
Date(int a_nYear, int a_nMonth, int a_nDay)
{
nYear = a_nYear;
nMonth = a_nMonth;
nDay = a_nDay;
}
Date operator + (int a_nDay)
{
Date copy = *this;
a_nDay += copy.nDay;
copy.nDay = a_nDay;
return copy;
}
Date operator -= (Date a_Date)
{
Date copy = *this;
copy.nYear -= a_Date.nYear;
copy.nMounth -= a_Date.nMonth;
copy.nDay -= a_Date.nDay;
return copy;
}
}
int main(int argc, char *argv[])
{
system("PAUSE");
return EXIT_SUCCESS;
}
Post został pochwalony 0 razy
|
|