C语言程序编译以后一直显示stdio.h里报错,为什么,怎么修改?求大神!

显示的错误是: c:\program files\microsoft visual studio\vc98\include\stdio.h(36) : warning C4518: 'extern ' : storage-class or type specifier(s) unexpected here; ignored c:\program files\microsoft visual studio\vc98\include\stdio.h(36) : error C2143: syntax error : missing ';' before 'string' c:\program files\microsoft visual studio\vc98\include\stdio.h(36) : fatal error C1004: unexpected end of file found 执行 cl.exe 时出错. ex03.obj - 1 error(s), 0 warning(s)

第1个回答  2019-03-08
检查
#include
<stdio.h>
以前的
程序,错在前。
-----------------------------------------------
c
程序,扩展名

.c,
不要用
.cpp
c++
程序,扩展名

.cpp
不要用
.c
c++
程序
若用
stdio.h
时,先要含
c++
的头:
#include<iostream>
using
namespace
std;
#include
<stdio.h>
相似回答