user2775084
user2775084

Reputation: 105

taking file as command line. Visual studio.

I am trying to run my program but I am not really sure how to do it.

I am working in visual studio and I have to take a file as the command line argument. So this is what I have done.

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


    ifstream inFile( argv[1] );

I not sure tho how to call it from the command window in Visual Studio. Any help?

Thank you

Upvotes: 0

Views: 29

Answers (1)

Guttsy
Guttsy

Reputation: 2119

In the solution explorer, go to your project and right click it, then choose Properties. On the Debug tab, you can provide arguments.

Upvotes: 1

Related Questions