If error C3646 is present in the program, then this error may be caused by a number of problems, and this article will analyze a variety of errors and corresponding workarounds.
On the official MSDN website, complier Error C3646 is defined as unknown override specifier and is interpreted as the compiler found a token in the position where it E Xpected to find a override specifier, but the token is not a recognized by the compiler.
1. Circular references
In separate compilation, we tend to write different classes or functions separately in different functions, improve work efficiency. However, if two classes are written in two different files when they are used, and they are referenced to each other, a circular reference will be thrown to raise this error.
Examples: Tire.h/tire.cpp and auto.h/auto.cpp include auto.h in tire.h, define an auto object, and then include Auto.h in Tire.h
Solution: The class definition of the. h file that was added to the error is preceded by the class declaration called classes (that is, Class).
2. Syntax errors
This problem is mostly caused by carelessness, such as a semicolon in a member function, and a Chinese semicolon, and such an error will occur.
Solution: Modify the semicolon
3. Sequence errors for classes
If a member of a class contains another class, the life of the contained class must precede the containing class.
Example:
class Auto { class Tire { int weight; // This would cause error C3656
Workaround: Adjust the position of the class.
In the face of this problem, we need to see the essence through the phenomenon.
Merry Christmas to everyone:)
Several possibilities for "error C3646: unknown rewrite specifier"