Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: candide on February 05, 2009, 12:36:21 am

Title: Redirecting standard input
Post by: candide on February 05, 2009, 12:36:21 am
Hi all

I try to redirect standard input from a text file to an executable program generated with codeblocks. With C::B running under Linux Ubuntu, from the menu Projet > set program's arguments, setting the program argument's box to

< foo.txt

does redirect the standard input to the foo.txt text file.

But this doesn't work under Windows. Another way to do this ?


Title: Re: Redirecting standard input
Post by: ollydbg on February 05, 2009, 06:38:00 am
Under windows, You should use:

XXX.exe >> a.txt


Which redirect the standard output to a.txt
Title: Re: Redirecting standard input
Post by: candide on February 05, 2009, 01:27:25 pm
Under windows, You should use:

XXX.exe >> a.txt


Which redirect the standard output to a.txt
The question was on redirecting
Title: Re: Redirecting standard input
Post by: ollydbg on February 05, 2009, 01:34:46 pm
Sorry for my mistake :D.
But I haven't heard direct INPUT in windows....
Title: Re: Redirecting standard input
Post by: Jenna on February 05, 2009, 01:58:26 pm
Not related to C::B and therefore violating our forum rules.

Topic locked.