Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » stdout not Displayed with Command Line Arguments
stdout not Displayed with Command Line Arguments [message #1038767] Thu, 11 April 2013 09:44 Go to next message
Michael ...... is currently offline Michael ......Friend
Messages: 2
Registered: April 2013
Junior Member
At the moment I'm working on an assignment where my program needs to be able to process text from stdin and output to stdout.

The problem is, as soon as I put in the command line arguments (arguments like -v and -d) for my program, the console stops displaying the stdout. Even if the program is literally a one line
printf("Hello World"); 
, the output will not be displayed if there are any command line arguments.

I'm setting these arguments in Run/Run Configurations/Arguments if that clarifies anything.

My second question is simply, how do I read the stdin from a text file in eclipse? At the moment I'm having to paste the input to the console every time I run the app.

Thanks for any help!
Re: stdout not Displayed with Command Line Arguments [message #1039620 is a reply to message #1038767] Fri, 12 April 2013 11:16 Go to previous message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
Quote:
the output will not be displayed if there are any command line arguments.

check:
http://wiki.eclipse.org/CDT/User/FAQ#Eclipse_console_does_not_show_output_on_Windows

Quote:
My second question is simply, how do I read the stdin from a text file in eclipse?

Did you try
< textfile
as command line argument?


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Previous Topic:Can't run C programs properly
Next Topic:croos toolchain
Goto Forum:
  


Current Time: Sat Dec 20 13:13:28 GMT 2014

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

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