Page 1 of 1

Passing Arguments / Console Window

Posted: Tue Mar 30, 2010 4:34 am
by swmason
Hey all,

If I pass an argument in the command line the console never displays. If I remove it, the console works. Is this a bug?

Here's my code:

#include <iostream>

using namespace std;

int main(int argc, char **argv)
{
cout<<"hello world\n";
cout<<argv[0]<<endl;
cout<<argv[1]<<endl;

return 0;
}

and I'm just running it with "main.exe -blah"

-Steve

Re: Passing Arguments / Console Window

Posted: Tue Mar 30, 2010 9:28 am
by eranif
Try runing it under gdb and see what happended

Eran