visual 2008:找不到标题 [英] visual 2008: can't find header
问题描述
我使用Visual C ++ 2008,我制作了一个头文件(好吧,复制了
标题" cat.h" from < a rel =nofollowhref =http://en.wikipedia.org/wiki/Opaque_pointertarget =_ blank> http://en.wikipedia.org/wiki/Opaque_pointer )
cat.h中唯一提到的包含main()的脚本是
行:
#include< cat .h>
我已经将头文件保存在与包含main的脚本
相同的项目中。编译时,我收到错误信息:
致命错误C1083:无法打开包含文件:''cat.h'':没有这样的文件或
目录
我对C非常不熟悉,我的猜测是我需要告诉
编译器查看我的项目目录中的标题。
有没有人知道怎么做或者可以告诉我呢?
谢谢,
亚当
Hi,
Im using Visual C++ 2008, I made a header file (well, copied the
header "cat.h" from http://en.wikipedia.org/wiki/Opaque_pointer)
The only mention of cat.h I have in my script containing main() is the
line:
#include <cat.h>
I''ve saved the header file within the same project as the script
containing main. When compiling, i get the error message:
fatal error C1083: Cannot open include file: ''cat.h'': No such file or
directory
Im incredibly new to C, and my guess is that I need to tell the
compiler to look in my project directory for headers.
Does anyone know how to do this or can advise me otherwise?
Thanks,
Adam
推荐答案
10月14日,8:59 * pm,Adam Chapman
< adam.chap ... @ student.manchester.ac .ukwrote:
On Oct 14, 8:59*pm, Adam Chapman
<adam.chap...@student.manchester.ac.ukwrote:
我使用Visual C ++ 2008,我制作了一个头文件(嗯,复制了
标题" cat.h" fromhttp://en.wikipedia.org/wiki/Opaque_pointer)
我唯一提到的cat.h我的包含main()的脚本是
行:
#include< cat.h>
我已经将头文件保存在同一个文件中项目作为脚本
包含main。编译时,我收到错误信息:
致命错误C1083:无法打开包含文件:''cat.h'':没有这样的文件或
目录
我对C非常不熟悉,我的猜测是我需要告诉
编译器查看我的项目目录中的标题。
有谁知道怎么做或者可以告诉我吗?
谢谢,
Adam
Hi,
Im using Visual C++ 2008, I made a header file (well, copied the
header "cat.h" fromhttp://en.wikipedia.org/wiki/Opaque_pointer)
The only mention of cat.h I have in my script containing main() is the
line:
#include <cat.h>
I''ve saved the header file within the same project as the script
containing main. When compiling, i get the error message:
fatal error C1083: Cannot open include file: ''cat.h'': No such file or
directory
Im incredibly new to C, and my guess is that I need to tell the
compiler to look in my project directory for headers.
Does anyone know how to do this or can advise me otherwise?
Thanks,
Adam
啊哈!应该使用cat.h而不是< cat.h>。这是用户创建的标题的标准
语法吗?
Aha! Should have used "cat.h" rather than <cat.h>. Is this a standard
syntax for user-created headers?
Adam Chapman写道,On 14/10/08 20:59:
Adam Chapman wrote, On 14/10/08 20:59:
我使用Visual C ++ 2008,我制作了一个头文件(好吧,复制了
$ b来自 http://en.wikipedia.org/的$ b标题" cat.h" wiki / Opaque_pointer )
我在脚本中包含main()的cat.h唯一提到的是
行:
#include< cat.h>
Hi,
Im using Visual C++ 2008, I made a header file (well, copied the
header "cat.h" from http://en.wikipedia.org/wiki/Opaque_pointer)
The only mention of cat.h I have in my script containing main() is the
line:
#include <cat.h>
你应该对你的
系统提供的包含文件使用尖括号,你应该为你提供的标题使用双引号。即尝试
#include" cat.h"
You should ony use angle brackets for include files provided by your
system, you should use double-quotes for headers you provide. I.e. try
#include "cat.h"
我已将头文件保存在同一项目中脚本
包含main。编译时,我收到错误信息:
致命错误C1083:无法打开包含文件:''cat.h'':没有这样的文件或
目录
我对C非常不熟悉,我的猜测是我需要告诉
编译器查看我的项目目录中的标题。
有谁知道怎么做或者可以告诉我吗?
I''ve saved the header file within the same project as the script
containing main. When compiling, i get the error message:
fatal error C1083: Cannot open include file: ''cat.h'': No such file or
directory
Im incredibly new to C, and my guess is that I need to tell the
compiler to look in my project directory for headers.
Does anyone know how to do this or can advise me otherwise?
有关如何使用Visual Studio的帮助,您应该使用Windows
编程组之一。不过我的猜测是,随着上面的变化,
将摆脱错误。
-
Flash Gordon
如果发送垃圾信息我将其发送至 sm**@spam.causeway.com
如果发送电子邮件我使用我的回复地址
请参阅我主持的comp.lang.c Wiki http://clc-wiki.net/
Adam Chapman写道,2008年8月14日21:02:>
< snip>
Adam Chapman wrote, On 14/10/08 21:02:
<snip>
啊哈!应该使用cat.h而不是< cat.h>。这是用户创建的标头的标准
语法吗?
Aha! Should have used "cat.h" rather than <cat.h>. Is this a standard
syntax for user-created headers?
是的。系统提供的标题的用户标题尖括号引用。
-
Flash Gordon
如果发送垃圾信息我发送给 sm ** @ spam.causeway.com
如果给我发电子邮件,请使用我的回复地址
请参阅我在 http://clc-wiki.net/上主持的comp.lang.c Wiki
这篇关于visual 2008:找不到标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!