[Solved] How to return “” OR empty when value of float is 1
You have marked this as C++ (4-1i) should be shown as (4-i) You might find std::stringstream helpful. It simplifies the special handling for the imaginary part: virtual int foo() { std::cout << std::endl; show(4, -2); show(5, -1); return(0); } void show(int real, int imaginary) { std::stringstream ss; // default is blank if (-1 == imaginary) … Read more