error: expected ‘;‘ at end of member declaration 和 expected ‘)‘ before ‘&‘ toke

created at 11-03-2021 views: 9

Error report

When developing C++ in the Linux environment, the following compilation errors or other inexplicable errors occurred while ensuring that the code was free of errors

error: expected ';' at end of member declaration
error: expected ‘)’ before ‘&’ toke

Solution

Check if the header file contains cyclically, for example, a.cpp contains bh, b.cpp contains ch, and c.cpp contains ah to form a loop. In this case, an error will be reported. .

created at:11-03-2021
edited at: 11-03-2021: