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.
#include<bits/stdc++.h>
#include<vector>
using namespace std;
int main(int argc, char *argv[]){
vector<int> arr;
cout<<"Arguments are:\n";
for(int i = 1 ; i < argc ; i++){
arr.push_back(argv[i]);
}
for(int i = 0 ; i < arr.size() ; i++){
cout<<arr[i]<<" ";
}
}
The code is giving below error.