#include <iostream.h>
#include <math.h>
#include "Prima_Clasa.h"



void punct_plan::setcoordy(int cy)
{
	this->coordy=abs(cy);
	cout << " this= " << hex << this <<"\n\n";
}

int punct_plan::getcoordy()
{
	return(this->coordy);
}

void punct_plan::inccoordx()
{
	coordx++;
	cout << " coordx= " << dec << coordx;
}

void punct_plan::inccoordy(punct_plan* ptr)
{
	ptr->coordy++;
	cout << " coordy= " << dec << ptr->coordy;
}


int punct_plan::coordx=10;

void main()
{


	cout << "\n Variabila statica : " << punct_plan::coordx << "\n";
	punct_plan punct1, punct2, *pointer;

		
	cout <<"\n &punct1= " << hex << &punct1 <<"\n punct1.setcoordy() ";
	punct1.setcoordy(10);
	cout <<"\n &punct2= " << hex << &punct2 << "\n punct2.setcoordy() ";
	punct2.setcoordy(10);

	cout <<" \n Pentru punct1 avem : ";
	punct1.inccoordx();
	pointer=&punct1;
	punct1.inccoordy(pointer);

	cout <<" \n Pentru punct2 avem : ";
	punct2.inccoordx();
	pointer=&punct2;
	punct2.inccoordy(pointer);

	cout << "\n\n";

}
