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:
- The problem that the content extra data in the notification cannot be updated
- The element “extra pin The solution of “in normal of part” warning
- [Altium problem] “extra pin u1-22 in normal of part U1”
- C language string processing error warning, c4996, sprintf, predicted, c4996, strcpy, c4996, strcat
- XML file should have root tag (extra content at the end of the document in file error)
- Error reading JSON file: json.decoder.JSONDecodeError : Extra data: line 6 column 2 (char 1329)
- Gcc compiler warning solution: “extra tokens at end of ifndef directive” Tags: GCC, warning
- Differences between length() size() and C strlen() of C + + string member functions
- Solve the problem of error: cannot pass objects of non trivially copyable type ‘STD:: String’ in C / C + +
- C++:error C2228: left of ‘.str’ must have class/struct/union
- C / C + + rounding function ceil(), floor ()
- error C2057: expected constant expression (Can the size of an array in C language be defined when the program is running?)
- ninja Compiling the C compiler identification source file CMakeCCompilerId.c failed
- Error c2137 of C language: empty character constant (Fixed)
- Solution to the flash of running result of dev C / C + +
- Solution to the problem of no C / C + + option in the new project of eclipse
- Error C2664 in C + + compilation: cannot convert parameter 2 from “const char [5]” to “lpctstr” solution.
- Error: unrecognized command line option “-std=c++11”, to solve the problem that ubuntu does not support c++11
- [Solved] Dev-C++ [Error] ‘for‘ loop initial declarations are only allowed in C99 or C11 mode
- To solve the running error of eclipse for C / C + +: launch failed binary not found