有谁知道如何从其他文件中读取数据? [英] Does anyone knows how to read a data from the other file?

查看:68
本文介绍了有谁知道如何从其他文件中读取数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法分别链接到另一个名为A1.c,A2.c和A3.c的文件。有谁知道如何链接到以下.c文件中的其他.c文件?

展开 | 选择 | Wrap < span class =codeDivider> | 行号

解决方案

< blockquote>如果你试图根据用户的选择执行用Ax.c文件编写的C / C ++代码,那就不是那样了。您需要根据编译器的文档编译它们并链接生成的目标文件。


但是我只使用C,而不是Visual C / C ++ ...这是什么它的命令?我是使用C语言的新人...所以我不知道这个案例的命令代码是什么。


你需要一个makefile或者你可以识别这些其他文件在OS命令行上。


该行的格式应该在你的编译器文档中。


你使用的是Visual C ++吗? />

如果是这样,只需将这些文件与包含main的tile文件一起添加到项目中,然后单击build。


I can''t link to the other file called A1.c, A2.c and A3.c respectively. Does anyone knows how to link to the other .c file from the following .c file?

Expand|Select|Wrap|Line Numbers

解决方案

If you are trying to execute the C/C++ code written in Ax.c file based on user''s choice, it''s not done that way. You need to compile them and link resulting object files according to your compiler''s documentation.


But my one just use C, not Visual C/C++...What''s the comand of it? I am a new guy for using C language...So I don''t know what the command code is for this case.


You need a makefile or you can identify these other files on the OS command line.

The format of that line shouloe be in yhour compiler documentation.

Are you using Visual C++?

If so, just add these files to your project along with tile file containing main and click on build.


这篇关于有谁知道如何从其他文件中读取数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆