Aug 24, 2014 at 5:22am UTC
#include<iostream.h>
#include<conio.h>
class distance
{
int feet,inches;
public:
void distance_assign(int f,int i)
{
feet=f;
inches=i;
}
void display()
{
cout<<"\n Feet:"<<feet<<"\t inches:"<<inches;
}
distance operator+(distance d2)
{
distance d3;
d3.feet=feet+d2.feet;
d3.inches=(inches+d2.inches);
d3.feet+=(inches+d2.inches);
return d3;
}
};
void main()
{
clrscr();
distance dist_1,dist_2;
dist_1.distance_assign(12,11);
dist_2.distance_assign(24,1);
distance dist_3=dist_1+dist_2;
dist_1.display();
dist_2.display();
dist_3.display();
getch();
}
Aug 24, 2014 at 7:08am UTC
Explain? Sure. Make one thread and stick to it.
Making multiple threads posting the exact same content is one example of what we call spam , especially when you ignore everything in those threads. Don't spam the forums.
Is that clear enough?