Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] How do I get eclipse/cdt to read from the standard inpu t?

I think, this is a shell (win32 or unix) who does the job. So instead of launching the program itself, launsh cmd.exe for Windows or sh/bash for Linux. Or change the program so it expects the file name to be passed as a command line argument.

Stephen McLaughlin wrote:

Hello-
  I am new to eclipse and accustomed to writing c/c++ programs using
the command line.  I have a c/c++ project I am trying to understand
written by someone else, so I thought using eclipse would make the job
easier since I can use the debugger (this program runs strictly under
linux, so microsoft is not an option).  I have what I believe is a very
simple question.  Let's say I want to run a program called "my_program".
This program first collects several arguments (written in Boulder I/O
format) from the standard input.  The Boulder I/O values are placed in a
file called "my_input_file".  So it looks something like this:

arg1=14
arg2=your_name
arg3=55.6

 The program can be successfully run on the command line as follows:

[]$./my_program < my_input_file

 I know how to run my program using Eclipse, but I don't know how to
get it to read the arguments out of a file like this.  Is this possible?
The first thing I tried was under the Arguments tab typing:

< my_input_file

 But, no dice.    I'd appreciate any help; thanks!

-Stephen


------------------------------------------------------------------------

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top