#include<iostream>
using std::cout;
using std::endl;
class Calculator{
private:
double count;
public:
Calculator(double a):count(a){};
double getcount(){
return count;
}
void operator++(int){
count++;
cout << "count:"<<count << endl ;
}
void operator++(){
++count;
cout <<"count:"<<count << endl ;
}
void operator--(int){
count--;
cout <<"count:"<<count << endl ;
}
void operator--(){
--count;
cout << "count"<< endl;
}
void operator+(Calculator b){
cout <<"conut:"<<this->count+b.count << endl ;
}
void operator-(Calculator b){
cout <<"count:"<<this->count-b.count << endl ;
}
};
void main()
{
Calculator a(5),b(6);
if((a.getcount()>=0)&&(a.getcount()<=65535))
a++;
++a;
a--;
--a;
if((b.getcount()>=0)&&(b.getcount()<=65535))
a+b;
a-b;
}
using std::cout;
using std::endl;
class Calculator{
private:
double count;
public:
Calculator(double a):count(a){};
double getcount(){
return count;
}
void operator++(int){
count++;
cout << "count:"<<count << endl ;
}
void operator++(){
++count;
cout <<"count:"<<count << endl ;
}
void operator--(int){
count--;
cout <<"count:"<<count << endl ;
}
void operator--(){
--count;
cout << "count"<< endl;
}
void operator+(Calculator b){
cout <<"conut:"<<this->count+b.count << endl ;
}
void operator-(Calculator b){
cout <<"count:"<<this->count-b.count << endl ;
}
};
void main()
{
Calculator a(5),b(6);
if((a.getcount()>=0)&&(a.getcount()<=65535))
a++;
++a;
a--;
--a;
if((b.getcount()>=0)&&(b.getcount()<=65535))
a+b;
a-b;
}