none
C4430: missing type specifier - int assumed. Note: C++ does not support default-int

    Question

  • HI

    I have been using a third party provided header file in my .NETClass Library project (VS2008). It is generating a lot of errors of some thing like that 

    " C4430: missing type specifier - int assumed. Note: C++ does not support default-int"

    Some of the code is:

    #ifndef __TESTSDK_H__
    #define __TESTSDK_H__
    
    #ifdef	TESTSDK_EXPORTS
    #define	SDKAPI	__declspec( dllexport )
    #else
    #define	SDKAPI	__declspec( dllimport )
    #endif
    
    #ifdef	__cplusplus
    extern "C" {
    #endif	/* def __cplusplus	*/
    
    typedef struct _STATUSVERSION {			//Status information version
    	WORD MajorVersion ;					//Major version
    	WORD MinerVersion ;					//miner version
    }STATUSVERSION, *LPSTATUSVERSION ;
    
    #ifdef	__cplusplus
    }
    #endif	/* def __cplusplus	*/
    
    #endif	/* __TESTSDK_H__	*/

     

    and It generates the following Errors

    Error	2	error C2146: syntax error : missing ';' before identifier 'MajorVersion'
    Error	3	error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    Error	4	error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    Error	5	error C2146: syntax error : missing ';' before identifier 'MinerVersion'
    Error	6	error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    Error	7	error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

    What causing these Errors ??

    Thursday, September 16, 2010 12:33 PM

Answers

  • scarus wrote:

    and It generates the following Errors

    Error 2 error C2146: syntax error : missing ';' before identifier  'MajorVersion'

    Looks like you are expected to #include <windows.h> before you include  this header.


    Igor Tandetnik

    • Marked as answer by scarus Thursday, September 16, 2010 12:50 PM
    Thursday, September 16, 2010 12:36 PM