All pastes #502439 Raw Edit

Mine

public cpp v1 · immutable
·published 2007-05-22 14:53 UTC
rendered paste body
//unärer additionsoperator += addition;  bruch+=bruch2 -> bruch=bruch+bruch2;rational rational::operator+=(rational const& bruch2){	rational tmp=rational((zaehler_*bruch2.nenner_)+(nenner_*bruch2.zaehler_),(nenner_*bruch2.nenner_));	*this = tmp;	return *this;}//normale Addition zweier brücherational operator+(rational const& bruch1,rational const& bruch2){	rational tmp=bruch1;	return (tmp+=bruch2);}