| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 633 人关注过本帖
标题:如何将多个文件放在一个程序中运行(在VC下)
只看楼主 加入收藏
huxs
Rank: 1
等 级:新手上路
帖 子:79
专家分:0
注 册:2007-10-7
收藏
 问题点数:0 回复次数:1 
如何将多个文件放在一个程序中运行(在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 文件 运行 
2007-10-16 22:29
huxs
Rank: 1
等 级:新手上路
帖 子:79
专家分:0
注 册:2007-10-7
收藏
得分:0 

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

2007-10-17 12:16
快速回复:如何将多个文件放在一个程序中运行(在VC下)
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.013663 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved