VC ++ 6.0上的Stdio.h

时间:2017-06-26 07:57:30

标签: c visual-c++

#include <stdio.h>

int main()

{   

        printf("HelloWorld\n");

        return 0;
}

单击构建按钮时出现一系列错误。但那里 当我替换&#34; stdlib.h&#34;时没有任何问题。 for&#34; stdio.h&#34;。

d:\program files (x86)\vc++ 6.0\vc6.0\vc98\include\stdio.h(84) : error C2059: syntax error : ','

d:\program files (x86)\vc++ 6.0\vc6.0\vc98\include\stdio.h(314) : error C2143: syntax error : missing '{' before '__cdecl'

d:\program files (x86)\vc++ 6.0\vc6.0\vc98\include\stdio.h(314) : error C2143: syntax error : missing ')' before '*'

d:\program files (x86)\vc++ 6.0\vc6.0\vc98\include\stdio.h(314) : error C2081: 'size_t' : name in formal parameter list illegal

d:\program files (x86)\vc++ 6.0\vc6.0\vc98\include\stdio.h(314) : error C2081: 'size_t' : name in formal parameter list illegal

d:\program files (x86)\vc++ 6.0\vc6.0\vc98\include\stdio.h(314) : error C2081: 'FILE' : name in formal parameter list illegal

d:\program files (x86)\vc++ 6.0\vc6.0\vc98\include\stdio.h(314) : error C2143: syntax error : missing '{' before '*'

d:\program files (x86)\vc++ 6.0\vc6.0\vc98\include\stdio.h(314) : error C2059: syntax error : ')'

d:\program files (x86)\vc++ 6.0\vc6.0\vc98\include\stdio.h(314) : error C2059: syntax error : ';'

d:\program files (x86)\vc++ 6.0\vc6.0\vc98\include\stdio.h(320) : error C2143: syntax error : missing '{' before '__cdecl'

d:\program files (x86)\vc++ 6.0\vc6.0\vc98\include\stdio.h(320) : error C2143: syntax error : missing ')' before '*'

d:\program files (x86)\vc++ 6.0\vc6.0\vc98\include\stdio.h(320) : error C2081: 'size_t' : name in formal parameter list illegal

d:\program files (x86)\vc++ 6.0\vc6.0\vc98\include\stdio.h(320) : error C2081: 'size_t' : name in formal parameter list illegal

d:\program files (x86)\vc++ 6.0\vc6.0\vc98\include\stdio.h(320) : error C2081: 'FILE' : name in formal parameter list illegal

d:\program files (x86)\vc++ 6.0\vc6.0\vc98\include\stdio.h(320) : error C2143: syntax error : missing '{' before '*'

d:\program files (x86)\vc++ 6.0\vc6.0\vc98\include\stdio.h(320) : error C2059: syntax error : ')'

d:\program files (x86)\vc++ 6.0\vc6.0\vc98\include\stdio.h(320) : error C2059: syntax error : ';'

d:\program files (x86)\vc++ 6.0\vc6.0\vc98\include\stdio.h(341) : error C2081: 'size_t' : name in formal parameter list illegal

d:\program files (x86)\vc++ 6.0\vc6.0\vc98\include\stdio.h(342) : error C2059: syntax error : ','

d:\program files (x86)\vc++ 6.0\vc6.0\vc98\include\stdio.h(342) : error C2143: syntax error : missing ')' before 'const'

d:\program files (x86)\vc++ 6.0\vc6.0\vc98\include\stdio.h(342) : error C2081: 'size_t' : name in formal parameter list illegal

d:\program files (x86)\vc++ 6.0\vc6.0\vc98\include\stdio.h(342) : error C2143: syntax error : missing '{' before 'const'

d:\program files (x86)\vc++ 6.0\vc6.0\vc98\include\stdio.h(342) : error C2059: syntax error : ','

d:\program files (x86)\vc++ 6.0\vc6.0\vc98\include\stdio.h(342) : error C2059: syntax error : ')'

d:\program files (x86)\vc++ 6.0\vc6.0\vc98\include\stdio.h(352) : error C2059: syntax error : ','

d:\program files (x86)\vc++ 6.0\vc6.0\vc98\include\stdio.h(352) : error C2143: syntax error : missing ')' before 'const'

d:\program files (x86)\vc++ 6.0\vc6.0\vc98\include\stdio.h(352) : error C2081: 'size_t' : name in formal parameter list illegal

d:\program files (x86)\vc++ 6.0\vc6.0\vc98\include\stdio.h(352) : error C2143: syntax error : missing '{' before 'const'

d:\program files (x86)\vc++ 6.0\vc6.0\vc98\include\stdio.h(352) : error C2059: syntax error : ','

d:\program files (x86)\vc++ 6.0\vc6.0\vc98\include\stdio.h(352) : error C2059: syntax error : ')'

d:\program files (x86)\vc++ 6.0\vc6.0\vc98\include\stdio.h(403) : fatal error C1003: error count exceeds 100; stopping compilation

1 个答案:

答案 0 :(得分:1)

您正在尝试使用C ++编译器编译C代码。

使用Visual Studio 6.0的一种方法是将源文件重命名为.c,而不是.cpp扩展名。这使编译器成为一种“C”模式。