Author Topic: Setting the programs' argument while Debugging  (Read 2947 times)

whocares21

  • Guest
Setting the programs' argument while Debugging
« 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:

Code
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:
Code
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...
« Last Edit: March 15, 2012, 01:15:17 pm by whocares21 »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Setting the programs' argument while Debugging
« Reply #1 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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]