All pastes #413415 Raw Edit

Unnamed

public text v1 · immutable
#413415 ·published 2007-03-28 12:16 UTC
rendered paste body
#include <iostream> 
#include <cstring> 
using namespace std; 

class komp 
{ 
private: 
int x; 
int y; 
public: 
void ivesti (); 
void isvesti (); 
komp (); 
komp sudeti (komp b); 
komp atimti (komp b); 
};

int main () 
{
	komp a,b,c;
	return 0;
}

komp::komp() 
{
	x=0;
	y=0;
}
void komp::isvesti() 
{
	cout << "("<<x<<","<<y<<")i";
}
void komp::ivesti() 
{
	cin >> x >> y; 
}
komp komp::sudeti(komp b) 
{ 
komp temp; 
temp.x=b.x+x; 
temp.y=b.y+y; 
return temp; 
} 
komp komp::atimti(komp b) 
{ 
komp temp; 
temp.x=x-b.x; 
temp.y=y-b.y; 
return temp; 
}