Passing Arguments / Console Window

CodeLite installation/troubleshooting forum
swmason
CodeLite Curious
Posts: 1
Joined: Tue Mar 30, 2010 4:03 am
Genuine User: Yes
IDE Question: C++
Contact:

Passing Arguments / Console Window

Post 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
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Passing Arguments / Console Window

Post by eranif »

Try runing it under gdb and see what happended

Eran
Make sure you have read the HOW TO POST thread
Post Reply