c - Xcode5与C失去连接错误

标签 c xcode5

当我构建并运行我的代码时,我得到了这个错误

one exited unexpectedly lost connection

Program ended with exit code; -1

有什么想法吗?

#include <stdio.h>

int main()
{
    int hour;
    float price, total_price;
    char first_letter;
    printf("Type first letter of worker name> ");
    scanf("%c",&first_letter);
    printf("Type work hours> ");
    scanf("%d",&hour);
    printf("Type price for per hour> ");
    scanf("%f",&price);
    total_price = hour * price;
    printf("%c worker will get money per hour: %f\n",first_letter,total_price);
    return 0;
}

最佳答案

我遇到了完全相同的问题。使用 shift+Enter,没有 shift 就是回车。

关于c - Xcode5与C失去连接错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20686814/

相关文章:

c - REST 和 C 流程集成

iOS 应用程序版本控制

uinavigationcontroller - 具有透明内容的 ios 7 View 与以前的 View 重叠

ios - 在 Xcode 中收到 "Check dependencies warning: skipping file"错误

c - '没有这样的文件或目录。'但文件在那里

c++ - 当短路评估可能导致函数未被调用时,是否有 gcc 警告标志?

c++ - 可以将存储类说明符应用于形式参数

c - 帧率限制器问题(不准确)

ios7 - 无法在模拟器中运行应用程序::XCODE 5

xcode - 在 Xcode 5 中使用 SVN 1.8.3