为什么在不包含<cctype>的情况下可以使用tolower()?

时间:2018-07-20 17:27:18

标签: c++

我的理解是tolower()是cctype中包含的函数(或某些其他库(例如,语言环境)中的另一种形式),但是我只是在程序中使用了它,而没有包括iostream。

为我编译的示例:

#include <iostream>
int main() {
    char testChar = 'H';
    testChar = tolower(testChar);
    std::cout << testChar << std::endl;
    return 0;
}

输出:

h

我的程序如何知道不包含cctype的tolower()?

0 个答案:

没有答案