如题...
为何我用#include"文件名" 这条语句程序编译会报错呢?报错如下:
Compiling...
file4.c
D:\VcProgram\wenjianljie\file4.c(6) : error C2143: syntax error : missing ')' before 'type'
D:\VcProgram\wenjianljie\file4.c(6) : error C2198: 'enter_string' : too few actual parameters
D:\VcProgram\wenjianljie\file4.c(6) : error C2059: syntax error : ')'
D:\VcProgram\wenjianljie\file4.c(7) : error C2143: syntax error : missing ')' before 'type'
D:\VcProgram\wenjianljie\file4.c(7) : error C2198: 'delete_string' : too few actual parameters
D:\VcProgram\wenjianljie\file4.c(7) : error C2059: syntax error : ')'
D:\VcProgram\wenjianljie\file4.c(8) : error C2143: syntax error : missing ')' before 'type'
D:\VcProgram\wenjianljie\file4.c(8) : error C2198: 'print_string' : too few actual parameters
D:\VcProgram\wenjianljie\file4.c(8) : error C2059: syntax error : ')'
D:\VcProgram\wenjianljie\file4.c(9) : error C2143: syntax error : missing ';' before 'type'
D:\VcProgram\wenjianljie\file4.c(10) : error C2143: syntax error : missing ';' before 'type'
D:\VcProgram\wenjianljie\file4.c(11) : error C2065: 'str' : undeclared identifier
D:\VcProgram\wenjianljie\file4.c(11) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int '
D:\VcProgram\wenjianljie\file4.c(11) : warning C4024: 'enter_string' : different types for formal and actual parameter 1
D:\VcProgram\wenjianljie\file4.c(12) : error C2065: 'c' : undeclared identifier
D:\VcProgram\wenjianljie\file4.c(13) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int '
D:\VcProgram\wenjianljie\file4.c(13) : warning C4024: 'delete_string' : different types for formal and actual parameter 1
D:\VcProgram\wenjianljie\file4.c(14) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int '
D:\VcProgram\wenjianljie\file4.c(14) : warning C4024: 'print_string' : different types for formal and actual parameter 1
Error executing cl.exe.
wenjianljie.exe - 13 error(s), 6 warning(s)
只能用extern 来调用我想要的函数,这样编译才通过了.