2011-08-19 3 views
1

나는 VC에서 만든 프로젝트의 번호를 가지고 ++ 2008
그들의 모든 하나 하나 만들려고 그러나 나는 다음과 같은 오류를 받고 있어요 :컴파일 오류 VC++ 2008

1>Compiling... 
1>main.cpp 
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\stdio.h(413) : error C2061: syntax error : identifier '_In_kpt_' 
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\stdio.h(413) : error C2143: syntax error : missing ')' before ';' 
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\stdio.h(414) : error C2337: 'In_' : attribute not found 
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\stdio.h(414) : error C2146: syntax error : missing ']' before identifier 'size_t' 
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\stdio.h(414) : error C2061: syntax error : identifier 'size_t' 
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\stdio.h(414) : error C2059: syntax error : ')' 
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\stdio.h(414) : error C2143: syntax error : missing ')' before ';' 
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\stdio.h(422) : fatal error C1021: invalid preprocessor command 'efdif' 

이상한 것은 비록 내가 심지어 'stdio.h'를 에 포함하고 있지 않다는 것입니다. 내 소스 코드는입니다. 문제는 간단한 'HelloWorld'테스트 에서조차 분명합니다.

#include <iostream> 
using namespace std; 

int main(){ 
    cout << "hello" << endl; 
} 

NB. 이 오류는 오늘 아침에 만 발생했습니다. VC++ 2008은 이것보다 완벽하게 작동했습니다.
시스템을 변경하지 않았습니다. 어떤 아이디어라도 감사 할 것입니다.

Kameel

편집 - 내 STDIO.H 파일에서 라인 411-420.

_Check_return_opt_ _CRTIMP int __cdecl _snprintf_c_l(_Out_cap_(_MaxCount) char * _DstBuf, _In_ size_t _MaxCount, _In_z_ _Printf_format_string_ const char * _Format,  _In_opt_ _locale_t _Locale, ...); 
_Check_return_opt_ _CRTIMP_ALTERNATIVE int __cdecl _snprintf_s_l(_Out_z_cap_(_DstSize) char * _DstBuf, _In_ size_t _DstSize, _In_ size_t _MaxCount, _In_z_ _Printf_format_string_ const char * _Format, _In_opt_ _locale_t _Locale, ...); 
_Check_return_opt_ _CRT_INSECURE_DEPRECATE(_vsnprintf_s_l) _CRTIMP int __cdecl _vsnprintf_l(_Out_cap_(_MaxCount) char * _DstBuf, _In_ size_t _MaxCount, _In_z_ _Printf_format_string_ const char * _Format, _In_opt_ _locale_t _Locale, va_list _ArgList); 
_Check_return_opt_ _CRTIMP int __cdecl _vsnprintf_c_l(_Out_cap_(_MaxCount) char * _DstBuf, _In_ size_t _MaxCount, const char *, _In_kpt_ _locale_t _Locale, va_list _ArgList!; 
_Check_return_opt_ _CRTIMP int __cdecl _vsnprintf_s_l(_Out_z_cap_(_DstSize) char * _DstBuf, [In_ size_t _DstSize, _In_ size_t _MaxCount, _In_z_ _Printf_format_string_ const char* _Format,_In_opt_ _locale_p _Locale, va_list _ArgList); 

#ifndef _WSTDIO_DEFINED 

/* wide function prototypes, also declared in wchar.h */ 

#ifndef WEOF 
#define WEOF (wint_t)(0xFBFF) 
#efdif 
+2

stdio.h는 iostream을 포함하여 간접적으로 포함됩니다. 귀하의 코드는 괜찮습니다, 그래서 나는 당신의 stdio.h를 clobbered했을지 모른다고 짐작하고 있습니다 - 게시 할 수 있습니까, 410-420 줄 말로 할 수 있습니까? 또한 최근에 변경되었는지 여부를 확인하기 위해 마지막으로 수정 한 시간을 확인해 볼 가치가 있습니다. – boycy

+0

@ kamz213 또한 새로운 안녕하세요 - 세계 프로젝트를 처음부터 만들어보고 문제가 해결되는지 확인하십시오. –

+0

@boycy - 파일이 수정되지 않았습니다. 위의 행을 게시했습니다. – kamz213

답변

7

stdio.h 파일이 손상되었습니다.

라인 413의 토큰은 _In_kpt_이 아니라 _In_opt_입니다.

라인 422는 #efdif이 아닌 #endif으로되어 있습니다.

다른 파일이 미묘하게 손상된 경우를 대비하여 VS 2008을 다시 설치해야합니다 (예 : 하드 드라이브에 문제가있는 경우를 대비하여 신중하게 확인한 후).

+0

그것은 좋은 붙잡음이다;) –

+0

@ 마이클 - 제안에 대해 감사드립니다. VS2008을 다시 설치했고 문제가 해결되었습니다. 파일이 수정 된 원인은 무엇입니까? 내 시스템 보호가 최신이며 문제를 해결하지 못했습니다. – kamz213

+0

아쉽다. 좋은 자리 @ 마이클 :) – boycy