All pastes #617618 Raw Edit

Unbenannt

public cpp v1 · immutable
·published 2007-07-13 11:29 UTC
rendered paste body
#include <iostream>#include <iomanip>using namespace std;class rechteck{private:	int h, b, x, y;public:	rechteck();	rechteck(int x, int y, int h, int b);	int get_height();	void set_height(int hohe);	int get_width();	void set_width(int breite);	int get_x();	int get_y();	void set_x(int xpos);	void set_y(int ypos);		int flaeche();	void show();};rechteck::rechteck(){	x=0;	y=0;	h=10;	b=20;}rechteck::rechteck(int x, int y, int h, int b){	x=x;	y=y;	h=h;	b=b;}int rechteck::get_height(){	return h;}void rechteck::set_height(int hohe){	h=hohe;}int rechteck::get_width(){	return b;}void rechteck::set_width(int breite){	b=breite;}int rechteck::get_x(){	return x;}int rechteck::get_y(){	return y;}void rechteck::set_x(int xpos){	x=xpos;}void rechteck::set_y(int ypos){	y=ypos;}int rechteck::flaeche(){	return h*b;}void rechteck::show(){		for(int j=0;j<h;j++){		for(int i=0;i<b;i++){			cout<<"x";		}		cout<< "hi" << endl;	}	}int main(){	rechteck * r=new rechteck();	rechteck * quadrat=new rechteck(1,1,10,10);//	r->set_height(10);//	r->set_width(20);	//cout<<r->flaeche();	r->show();	quadrat->show();	}