无法从NetBeans的输入值,但在cmd中工作 [英] Cannot enter value from netbeans but working in cmd
本文介绍了无法从NetBeans的输入值,但在cmd中工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在NetBeans,以C和C ++编程安装MinGW的。结果
下面是我试图NetBeans上运行一个简单的code:
I have installed MinGW on netbeans for C and C++ programming.
Here is a simple code that I am trying to run on netbeans :
#include <stdio.h>
int main(int argc, char** argv) {
printf("Inside Main...\n");
int n;
printf("Enter : ");
scanf("%d", &n); // When I remove this line, it is working.
printf("You have entered %d.", n);
return (1);
}
每当我尝试访问从NetBeans中控制台的任何价值,我什么也没看到。
Whenever I try to access any value from netbeans console, I don't see anything.
与scanf函数输出(...)
无scanf函数输出(...)
的如果我尝试从CMD这些code,所有正在的
推荐答案
的 scanf()的
您必须使用 NetBeans外部端子
!
正常运行
您也可以使用 Netbeans的标准输出
!结果
但是,这是更具有误导性。结果
当你看到一个空端子输入做 123
命中Enter键后,得到的输出的一次。
after hit enter , you get the output all at once .
这篇关于无法从NetBeans的输入值,但在cmd中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文