& Quot; error C4430: The type specifier is missing-it is assumed that it is int. Note: C

Source: Internet
Author: User

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.

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.