Sat Nov 08, 2008 3:20 pm
complex complex :: operator + (complex & x)
{
complex temp;
temp.real = x.real + real;
temp.imag = x.imag + imag;
return (temp);
}
ostream & operator << (ostream & toout,complex x)
{
if (x.imag < 0)
toout<<x.real << " - " <<abs(x.imag)<<"i"<<endl;
else
toout<<x.real << " + " <<x.imag<<"i"<<endl;
return(toout);
}
Sat Nov 08, 2008 3:22 pm
cout << "string " << 1;
|
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.