printf不在eclipse中的控制台中打印

时间:2014-11-01 18:04:18

标签: c eclipse

我刚刚开始在Eclipse上运行,我似乎遇到了printf()语句的问题。我运行了一个在Notepad ++中运行的基本代码,但在Eclipse中似乎没有做同样的事情。编译并运行程序后,下面的控制台中似乎没有打印任何内容。我的代码,IDE或其他东西有什么问题吗?

#include<stdio.h>


int main (void)
{
    printf("Hello world");
    fflush(stdout);

    return 0;
}

1 个答案:

答案 0 :(得分:2)

此链接可能会有所帮助

Why does printf not flush after the call unless a newline is in the format string?

尝试添加&#39; \ n&#39;在printf。

printf("Hello world\n");
相关问题