文件未打开... [英] file not opening......

查看:84
本文介绍了文件未打开...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

#include"puzzle.h"
#include"cursesGui.h"
这两行在编译时在我的程序中造成麻烦.
错误消息是无法打开包含"puzzle.h"和"cursesgui.h"的文件
该错误消息的原因可能是什么?

#include "puzzle.h"
#include "cursesGui.h"
these 2 lines are making trouble in my program while compiling.
the error message is "unable to open file include ''puzzle.h'' and ''cursesgui.h''
what could be the reason of this error message? and its solution?

推荐答案

再次:查看错误消息.编译器告诉您无法打开这些文件,这可能意味着:

  • 名称拼写错误.
  • 文件与源代码不在同一文件中.
  • 它们不在路径.
Once again: look at the error messages. The compiler is telling you that it cannot open these files which probably means one of:

  • The names are not spelled correctly.
  • The files are not in the same file as the source code.
  • They are not in any of the directories specified by the INCLUDE path.


编译器找不到这些文件.
您的开发环境是? Windows? Linux的?其他?
这些库应该做什么?
请提供更多信息.
The compiler could not found those files.
Your development environment are ? Windows ? Linux ? Other ?
What are those libraries supposed to do ?
Give more info please.


如果您使用的是Visual Studio,则需要确保这两个标头位于项目所在的同一目录中.
否则,您需要将它们复制到项目目录,也许还需要右键单击解决方案资源管理器"视图中的目录"Header Files",然后选择添加>现有项目.

或者,尤其是如果这两个标头包含其他子标头,则只需简单地进行以下操作即可:打开项目,然后转到工具>选项>项目和解决方案VC ++目录.

现在,从组合框显示目录"中选择包含文件",并添加新行并选择puzzle.hcursesGui.h所在的目录,然后单击确定".现在将"更改为"<>他们就变成了:

If you were using Visual Studio, you need to make sure that these two headers are located in the same directory where your project is located.

Otherwise you need to copy them to the project directory, perhaps you also need to right-click on the directory ''Header Files'' in the ''Solutions Explorer'' view and choose Add > Existing Item.

Or , espatally if these two headers include other sub-headers, you cloud simply do the flowing: Open your project and go to Tools > Options > Projects and Solutions > VC++ Directories.

Now from the combo box ''Show directories for'' choose ''Include files'', and add a new line and choose the directory where puzzle.h and cursesGui.h are located and then click OK. Now change ''""'' to "<>" so they become:

#include <puzzle.h>
#include <cursesGui.h>


这篇关于文件未打开...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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