Home Forums Programming help with constructors Reply To: help with constructors


hmm….but is the line:
[code:1:a9529b5902]complex(float = 1, float = 0); [/code:1:a9529b5902] a default constructor??

because later on in the .cpp file, another constructor is declared
[code:1:a9529b5902]Complex::Complex(float r, float i){
real = r;
imag = i;

Are the parameters here would be set by the user instead of the compiler??
sorry about all this nooby question, I’m like very new to this C++ thing, although I’ve done a bit of C last year