c++ extra qualification

When running the code, I encountered the following error:
Extra qualification ‘Complex::’ on member ‘Complex’
Its code is as follows:
Complex: : Complex (double r)
{
m_real = r;
m_imag = 0.0;

}
Extra markeyerror is a common error in compiling C++ programs with GCC/G++ of version 4 or above.

This is the name of the over-referenced class in the statement — just drop the class name before the function: :, as follows:
Complex (double r)
{
m_real = r;
m_imag = 0.0;

}

Read More: