X code ++ 4.5字符扶手箱不显示,与scanf()的C语言 [英] Xcode 4.5 character not show in console box , with scanf() in C language

查看:148
本文介绍了X code ++ 4.5字符扶手箱不显示,与scanf()的C语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于更新到X code ++ 4.5我有这个问题。

我键入 4555 在控制台框,但它仅显示 4 控制台框。

我尝试不同的输入参数,如%d个%F %C %S ,都有着同样的问题。

我不明白这一点。如何解决呢?

我的源$ C ​​$ c是

 的#include<&stdio.h中GT;诠释的main()
{
    INT输入;
    //插入code这里...    的printf(你好,世界\\ n!);
    的printf(请输入号码:);
    scanf函数(%d个,&安培;输入);
    的getchar();
    的printf(输入:%D,输入);
    返回0;
}

和控制台中显示:

 >你好,世界!>请输入号码:4>输入的是:4555


解决方案

看来,这是X code ++ 4.5的一个bug。参见:


  

有对这个问题的苹果的付费开发商论坛的讨论。它在X code ++ 4.5中的错误。苹果的工程师正在研究这个问题,但没有修复呢。


  
  

有两种解决方法。第一个解决方法是运行从终端的命令行应用程序。在X code项目导航器中选择从产品文件夹中的可执行文件。右键单击并选择在Finder中显示。在Finder中双击可执行文件来启动它在终端。


  
  

第二个解决方法是安装X code 4.4。选择X code>开放式开发工具>更多开发工具访问苹果的开发者下载网站。



  

是的,这是从4.4证实回归,我们正在追踪内部它。这实在是不幸的是,这种下滑的,但我们会得到它尽快修复。


I have got this problem since updated to Xcode 4.5.

I typed 4555 in console box but it show only 4 in console box.

I tried different input parameters such as %d, %f, %c and %s, all have the same problem.

I don't get it. How to fix it?

My source code is

#include <stdio.h>

int main()
{
    int input;
    // insert code here...

    printf("Hello, World!\n");
    printf("Please Enter Number : ");
    scanf("%d",&input);
    getchar();
    printf("Input is : %d",input);
    return 0;
}

and console box shows:

>Hello, World!

>Please Enter Number : 4

>Input is : 4555

解决方案

It seems that this is a bug of Xcode 4.5. See:

There's a discussion of this issue on Apple's paid developer forums. It's a bug in Xcode 4.5. Apple's engineers are looking into the issue, but there's no fix yet.

There are two workarounds. The first workaround is to run your command-line app from the Terminal. In the Xcode project navigator select your executable from the Products folder. Right-click and choose Show in Finder. Double-click the executable in the Finder to launch it in the Terminal.

The second workaround is to install Xcode 4.4. Choose Xcode > Open Developer Tool > More Developer Tools to access Apple's developer downloads site.

Yes, this is a confirmed regression from 4.4, and we're tracking it internally. It is really unfortunate that this slipped in, but we'll get it fixed ASAP.

这篇关于X code ++ 4.5字符扶手箱不显示,与scanf()的C语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆