【问题标题】:Getch and getche not found in Xcode在 Xcode 中找不到 getch 和 getche
【发布时间】:2019-10-10 04:27:34
【问题描述】:

我正在学习编程 C 语言,但遇到了一个问题。我无法在 Xcode 中使用函数 getch 和 getche。我在我的项目中包含了标题和,但它说 getch 和 getche 是未定义的符号。我该如何解决?谢谢enter image description here

【问题讨论】:

    标签: c xcode


    【解决方案1】:

    getchgetche 是来自 Borland 的旧 Turbo C 编译器的函数。您将无法在 XCode 中找到它。相反,您应该将getchar, 与其他可以模拟相同功能的功能结合使用。

    【讨论】:

    • gerchar如何与其他功能结合使用?谢谢
    • includehelp.com/c-programs/… 显示了适用于 Linux 的示例,并且应该适用于 XCode,因为 Mac OS X 基于 BSD。
    猜你喜欢
    • 2021-09-08
    • 2011-11-20
    • 2011-12-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-02-08
    • 2023-01-19
    相关资源
    最近更新 更多