How can I open a command window at the folder containing the .exe file, inorder to enter the program name or arguments?

This is the code

#include <iostream>
using std::cout;
using std::endl;

int main(int argc, char* argv[])
{

cout << endl << "argc = " << argc << endl;
cout << "Command line arguments received are:" << endl;
for(int i = 0; i <argc; i++)
cout << "argument " << (i+1) << ": " << argv[i] << endl;

return 0;
}


The only Problem I have is that I need to know how to open a command window at the folder containing the .exe file(this program), inorder to enter the program name or arguments.

Please help. Thanks in advance
Thank you ats15 for your time. I learned how to do it via the link you provided, thanks again.
Topic archived. No new replies allowed.