0

I am trying to execute my C++ program using this executable:

./dijkestra <graph> <direction>

Where ./dijkestra is my executable, (which I already set in my Makefile). graph is the .txt file I will be reading from, and direction is a variable that tells me the direction of the graph.

What do I need to add to my code for it to understand and set these variables? Is it something I need to add to my Makefile?

jt1500
  • 1
  • 1
    You must handle `argc` and `argv`. https://stackoverflow.com/questions/3024197/what-does-int-argc-char-argv-mean – Devolus Apr 01 '21 at 22:30
  • 1
    You need to learn about the parameters to the `main()` function, specifically what they are and how they are used. For example, here: **What does int argc, char *argv[] mean?** https://stackoverflow.com/questions/3024197/what-does-int-argc-char-argv-mean. – CiaPan Apr 01 '21 at 22:32

0 Answers0