Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Eclipse console behaving differently compared to cmd.exe(The compiled program behaves differently inside the default eclipse console compared the cmd.exe console)
icon5.gif  Eclipse console behaving differently compared to cmd.exe [message #1277166] Tue, 25 March 2014 15:45 Go to next message
Rahul S is currently offline Rahul SFriend
Messages: 1
Registered: March 2014
Junior Member
I have created a simple c project in eclipse CDT kepler .The program just asks for a number and prints it out.

int main(void)
	{
		int a,b,c;
		printf("Enter a number ->");
		scanf("%d",&a);
		printf("the number is %d",a);
	}


when i run the program nothing is printed in the eclipse console window,only a blinking cursor is visible.when i enter a number for eg 1
i get the following output

1

Enter a number ->the number is 1


if i go to Debug folder and click the exe file .the program runs ok. why is there a difference in behavior between the two cases?

while on other IDE's like Visual C++,Code::Blocks when you Run the program the program runs in the system console (cmd.exe).Is it possible to do use cmd.exe instead of eclipse console.



Re: Eclipse console behaving differently compared to cmd.exe [message #1278040 is a reply to message #1277166] Wed, 26 March 2014 20:40 Go to previous message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
The output of the Eclipse console is buffered. You can find an explanation and workaround here http://wiki.eclipse.org/CDT/User/FAQ#Eclipse_console_does_not_show_output_on_Windows


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Previous Topic:disabling preprocessor
Next Topic:Can't update eclipse kepler
Goto Forum:
  


Current Time: Fri Apr 19 21:54:45 GMT 2024

Powered by FUDForum. Page generated in 0.02860 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top