你能告诉我如何解决这个错误 [英] can you please tell me how to solve this error
本文介绍了你能告诉我如何解决这个错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
[错误] iostream.h:没有这样的文件或目录
[错误] ctye.h:没有这样的文件或目录
[Error] iostream.h: No such file or directory
[Error] ctye.h: No such file or directory
推荐答案
如果你收到一条你不明白的错误信息,首先要做的就是将它复制并粘贴到Google中 - 你很可能没有'第一个,并且现有的帖子会有解决方案。
这次肯定是这样的: Google [ ^ ] - 所以请按照几个链接s并查看哪种原因符合您的确切情况。它也比等待我们为你做的更快......
If you get an error message you don't understand, the first thing to do is copy and paste it into Google - the chances are that you aren't the first, and that there will be existing posts with solutions.
That's certainly true this time: Google[^] - so follow a few links and see which cause matches your exact situation. It's also quicker than waiting for us to do it for you...
没有头文件 iostream.h 和 ctye.h 。但是有一个 iostream 文件(没有.h扩展名)和一个 ctype.h 文件。
所以你应该使用:
There are no header files iostream.h and ctye.h. But there is a iostream file (without the .h extension) and a ctype.h file.
So you should use:
#include <iostream>
#include <ctype.h>
您可以查看一些C ++规范(或者如果您不想花钱购买它,例如工作草案,编程语言C ++标准 [ ^ ])。
Se e17.6.1.2标题部分:
[...]每个标题 cname 的内容应与相应标题 name.h ,如C标准库[...]中所指定。但是,在C ++标准库中,声明(除了在C中定义为宏的名称除外)都在命名空间 std 的命名空间范围内。 [...]
然后C ++标题以及C标题列在单独的表中:
< b> C ++库头
<算法> < fstream的> <列表> <正则表达式> < typeindex> <阵列> <功能> <语言环境> <集> <所属类别> <原子> <未来> <映射> < sstream> < type_traits> <位集> < initializer_list> ; <存储器> <堆叠> < unordered_map> <计时> <了iomanip> <互斥> < stdexcept> < unordered_set> <的codecvt> < IOS> <新> <流缓冲> <实用> <复杂> < iosfwd> <数字> <字符串> <的valarray> ; < condition_variable> <的iostream> < ostream的> < strstream> <矢量> <双端队列> < istream的> < ;队列> < SYSTEM_ERROR> <例外> <迭代> <随机> <螺纹> <修饰符Modifiers> <限定> < ratio> < tuple>
C库标题
< ;了cassert> < cinttypes> < csignal> < cstdio> < cwchar> < ccomplex> < ciso646> < cstdalign> < cstdlib> < cwctype> < cctype> ; < climits> < cstdarg> < CString的GT; < cerrno> < clocale> < cstdbool> < ctgmath> < ; cfenv> < CMATH> < cstddef> <的ctime> < cfloat> < csetjmp> < cstdint> < cuchar>
附录D.5使用旧式C头文件的详细信息。
[... ]为了与C标准库[...]兼容,C ++标准库提供了25个C标题[...]
C标题
>
< ASSERT.H> < inttypes.h> < signal.h中> < stdio.h中> < wchar.h> < complex.h> < iso646.h> < stdalign。 h取代; < stdlib.h中> < wctype.h> < /tr><ctype.h> <limits.h> <stdarg.h> < string.h中> < errno.h中> < locale.h文件> < stdbool.h> < tgmath.h> < fenv.h> <文件math.h> < STDDEF.H> < time.h中> < FLOAT.H> < ; setjmp.h> < stdint.h> < uchar.h>
[...]每个C头,每个头的名称都是 name.h ,就像每个名字一样通过相应的 cname 标头放置在标准库命名空间中的文件放在全局命名空间范围中。 [...]
干杯
Andi
You may have a look at some C++ specification (or if you do not want to spend money for it, on a draft of it, e.g. Working Draft, Standard for Programming Language C++[^]).
See section "17.6.1.2 Headers":
[...] the contents of each header cname shall be the same as that of the corresponding header name.h, as specified in the C standard library [...]. In the C++ standard library, however, the declarations (except for names which are defined as macros in C) are within namespace scope [...] of the namespace std. [...]
The C++ headers as well as the C headers then are listed in separate tables:
C++ library headers
<algorithm> <fstream> <list> <regex> <typeindex> <array> <functional> <locale> <set> <typeinfo> <atomic> <future> <map> <sstream> <type_traits> <bitset> <initializer_list> <memory> <stack> <unordered_map> <chrono> <iomanip> <mutex> <stdexcept> <unordered_set> <codecvt> <ios> <new> <streambuf> <utility> <complex> <iosfwd> <numeric> <string> <valarray> <condition_variable> <iostream> <ostream> <strstream> <vector> <deque> <istream> <queue> <system_error> <exception> <iterator> <random> <thread> <forward_list> <limits> <ratio> <tuple>
C library headers
<cassert> <cinttypes> <csignal> <cstdio> <cwchar> <ccomplex> <ciso646> <cstdalign> <cstdlib> <cwctype> <cctype> <climits> <cstdarg> <cstring> <cerrno> <clocale> <cstdbool> <ctgmath> <cfenv> <cmath> <cstddef> <ctime> <cfloat> <csetjmp> <cstdint> <cuchar>
Appendix D.5 details using the "old-style" C header files.
[...] For compatibility with the C standard library [...], the C++ standard library provides the 25 C headers [...]
C headers
<assert.h> <inttypes.h> <signal.h> <stdio.h> <wchar.h> <complex.h> <iso646.h> <stdalign.h> <stdlib.h> <wctype.h> <ctype.h> <limits.h> <stdarg.h> <string.h> <errno.h> <locale.h> <stdbool.h> <tgmath.h> <fenv.h> <math.h> <stddef.h> <time.h> <float.h> <setjmp.h> <stdint.h> <uchar.h>
[...] Every C header, each of which has a name of the form name.h, behaves as if each name placed in the standard library namespace by the corresponding cname header is placed within the global namespace scope. [...]
Cheers
Andi
这篇关于你能告诉我如何解决这个错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文