C++ Calculator for complex numbers - follow-up
Use field initialization lists:

So your constructor

ComplexNumber(double real = 0.0, double imaginary = 0.0) {
    this-&gt;real = real;
    this-&gt;imaginary = imaginary;
}


Can become:

ComplexNumber(double real = 0.0, double imaginary = 0.0)
    : real(real), imaginary(imaginary) { }


Simplify your returns

I could see an argument for making an extra ComplexNumber to hold your return value if you need to further modify it or if the name of that variable is explanatory in showing what the return means, but as it stands, your c is neither of those.

Simplify

ComplexNumber c = ComplexNumber(real, imaginary);
return c;


To just

return ComplexNumber(real, imaginary);


Make your operator functions const

Since you (correctly) don't modify a when you do a + b, the operator function can (and should) be declared const. That way, even if you have a const object, you'll still be able to call it (and if you accidentally try to modify the member variable, you'll know immediately in the form of a compilation error).

That'd look like:

ComplexNumber operator+(const ComplexNumber &amp;b) const {


Notice I've also declared b as const here since you shouldn't be modifying it either. I've also passed it by reference to save you some overhead.

Make your class printable with std::cout

Your printNumber is very specific. In fact, if you ever want to use this class for anything other than simply showing arithmetic results, that print may not be what you want. Instead, I'd make a generic str() that just returns a string version of the complex number. Something like:

std::string str() {
    std::ostringstream oss;
    oss &lt;&lt; this-&gt;real &lt;&lt; " + (" &lt;&lt; this-&gt;imaginary &lt;&lt; ") * i";
    return oss.str(); 
}


And then in the global scope, you can overload the &lt;&lt; operator for std::cout:

std::ostream&amp; operator&lt;&lt;(std::ostream &amp;os, const ComplexNumber &amp;cn) {
    return os &lt;&lt; cn.str();
}


And now when you want to print it in main(), you can say:

std::cout &lt;&lt; "a + b = " &lt;&lt; a + b &lt;&lt; std::endl;
std::cout &lt;&lt; "a - b = " &lt;&lt; a - b &lt;&lt; std::endl;
std::cout &lt;&lt; "a * b = " &lt;&lt; a * b &lt;&lt; std::endl;
std::cout &lt;&lt; "a / b = " &lt;&lt; a / b &lt;&lt; std::endl;


Look at how easy that becomes to read and understand!