Reading Command Line into C++

I need to write a program that outputs the number of characters, words, and lines in the files that are supplied as command-line arguments. This is what I have so far, but I'm really confused as to what should be the next step:

#include <iostream>
#include <string>
#include <iomanip>
#include <fstream>
using namespace std;

int main (int argc , char **argv)
{
cout<<"You provided "<<argc-1<<" arguments"<<endl;
cout<<"The name of the program is: "<<argv[0]<<endl;

if (argc > 3)
{
cout<<argv[1]<<argv[2]<<argv[3]<<endl;
}

system ("pause");
return 0;
}
in the files, like wc does: http://linux.die.net/man/1/wc
This link is perfect, thank you ! When it comes to coding, do you have an example of how it looks in Visual Studios? We haven't done anything with Linux, so I've learned something today
Topic archived. No new replies allowed.