deserty Posted June 29, 2012 Report Share Posted June 29, 2012 Sa se defineasca o clasa PolinomAtentie dradul polinomului-coeficenti polinomului;ex f=3x la a3 +2x la a 2 +1gradu=3... coeficenti=[3,2,0,1]Se cere independenta pt:constructor implicit/explicit/copiere;destuctorget/setsupraincarcarea operantilor: +,-,<<,si,>>/Promit ca nu raman dator celui care ma ajuta.Am nev acum. Quote Link to comment Share on other sites More sharing options...
cmiN Posted June 29, 2012 Report Share Posted June 29, 2012 Simple Polynomial class | DaniWebhttp://www.programmersheaven.com/mb/CandCPP/418372/418372/polynomial-class-with-rational-coefficients/?S=B20000Unde ai minus, plus, etc, inlocuiesti cu operator{semn}(...), iar pentru << si >> supraincarci cu ceva asemanator friend ostream& operator<<(ostream &output, Polinom obj);friend istream& operator>>(istream &input, Polinom& obj);Nu cred ca se apuca nimeni sa scrie si sa-ti dea mura in gura mai ales ca sunt tone de exemple pe net. Quote Link to comment Share on other sites More sharing options...