Command line arguments

Hello, my professor wants us to get the program to take in an ASCII value and convert it into binary and vice versa. But she wants us to take it in as a command line argument. I have no idea how to do command lines. I've watched videos and read textbooks but cannot wrap around it besides the basics. Plus, she wants it so -a will correspond to the ASCII and -b will correspond to the binary. And I do not know how to account for that at all. Please help!
argc and argv are the command line arguments:
1
2
3
4
5
6
7
8
9
10
11
12
#include <iostream>

using namespace std;

int main(int argc, char* argv[]) // This comes from the command line
{
  for(int i = 0; i < argc; ++i)
  {
    cout << argv[i] << endl;
  }
  return 0;
}
Topic archived. No new replies allowed.