When C ++ code is compiled under. NET, "error C4430: The type specifier is missing-it is assumed to be int. Note: C ++ does not support the default int "error.
After investigation, I found that the sequence of reference header files may be wrong. I put my own header files before the stdafx. h header file. I can adjust the front and back positions to each other.
# Include "stdafx. h"
# Include "xuhk_JNIHelloWorld.h"
I found that it may also be caused by other reasons:
1. (This often occurs in Large Engineering Projects) if there are two Class header files. h and B. h, in. h has the following statement: # include "B. h ", in B. the H file contains the following statement: # include ". h "and this error occurs when one class has another class object.
2. No header file containing the class to be defined.
3. The macro definition is added to the project, leading to repeated definitions in the header file or the corresponding macro being unrecognizable.
4. When there are multiple headers of files, reverse sequential write may also lead to related errors. This is simply because the pre-compiled statements in the header file are hidden.