错误,包括< ctype>在原子上使用C 11

Error while including <ctype> on atom using c++11

本文关键字:gt 包括 lt ctype 错误      更新时间:2023-10-16

我试图在c 11上使用isapha(),因此必须包括ctype>,但是当我尝试这样做时,它给了我错误:

fatal error: 'ctype' file not found #include <ctype>

正确的文件名是cctype,而不是ctype,因为它来自C的ctype.h,并且C 中的所有C库都有c前缀和无.h后缀。

可用选项是 <ctype.h><cctype>(注意:两个'c,而不仅仅是一个)。后者通常是首选。