stringstream error help please

I am using stringstream for the first time and am a bit lost. I thought i understood what to but keep getting an error. here is my code.

stringstream cComplexN::getComplexN()
{
stringstream a;
if (imag < 0)
{
a << real << " " << imag << i;
}

else if (imag > 0)
{
a << real << " + " << imag << i;
}

return a.str();
}

real and imag are both double variables and i is a char variable.
thanks in advance.

Jory
1
2
3
4
string cComplexN::getComplexN()
{
  ...
}

Remember, a stringstream is for converting things to/from a string.

Hope this helps.
ah ty very much yes that was the issue.
Topic archived. No new replies allowed.