title: How do I take a vector input using command line argument?
body: <p>I am not familiar with using command line arguments. I am trying to take a vector input as a command line argument. Please refer the below code and help me with the error.</p>
  <pre><code>#include&lt;bits/stdc++.h&gt;
  #include&lt;vector&gt;
  
  using namespace std;
  
  int main(int argc, char *argv[]){
      vector&lt;int&gt; arr;
      cout&lt;&lt;&quot;Arguments are:\n&quot;;
      for(int i = 1 ; i &lt; argc ; i++){
          arr.push_back(argv[i]);
      }
      for(int i = 0 ; i &lt; arr.size() ; i++){
          cout&lt;&lt;arr[i]&lt;&lt;&quot; &quot;;
      }
  }
  </code></pre>
  <p>The code is giving below error.</p>
  <p><a href="https://i.stack.imgur.com/JCW5H.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JCW5H.png" alt="enter image description here" /></a></p>