Code::Blocks Forums

User forums => Help => Topic started by: whocares21 on March 15, 2012, 01:01:04 PM

Poll
Question: how to type programs' arguments?
Option 1: <input.txt votes: 1
Option 2: another way votes: 0
Title: Setting the programs' argument while Debugging
Post by: whocares21 on March 15, 2012, 01:01:04 PM
Hello. Everyone says that type your CL arguments in the 'set programs argument' part. I did it but it didnt work. I typed "<input.txt" and i tested it. under the main i coded:

if(argv[1] == "input.txt") cout<<"Done"<<endl;// i mean strcmp() here

it worked well but it doesnt count my input.txt as a input file when i DEBUG with F8

Normally, in ms-dos i type: C:\myProject\bin\debug>myProject<input.txt and it works perfect.

is there anyone can do it? cos my input file very huge and i have to debug :( I hope somebody understand what i want

Sorry for my bad english.. Thanks in advance...
Title: Re: Setting the programs' argument while Debugging
Post by: oBFusCATed on March 15, 2012, 01:34:32 PM
"<input.txt" is not a parameter, but a redirection.
There is quite a difference. Search for redirections in your favourite unix programming book if you want to know more.
Redirections are not supported currently but both C::B and gdb (the actual debugger).

p.s. the poll is useless.