Passing Arguments / Console Window
Posted: Tue Mar 30, 2010 4:34 am
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
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