当前位置: 代码迷 >> C语言 >> 如何将多个文件放在一个程序中运行(在VC下)
  详细解决方案

如何将多个文件放在一个程序中运行(在VC下)

热度:407   发布时间:2007-10-16 22:29:44.0
如何将多个文件放在一个程序中运行(在VC下)

如题...
为何我用#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 来调用我想要的函数,这样编译才通过了.

搜索更多相关的解决方案: VC  文件  运行  

----------------解决方案--------------------------------------------------------

晕,怎么没一个人帮忙呢...


----------------解决方案--------------------------------------------------------
  相关解决方案