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

#45675
Anonymous
Inactive

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;
}[/code:1:a9529b5902]

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