I need to get an argument and convert it to an int. Here is my code so far:
#include using namespace std; int main(int argc,int argvx[]) {
std::stoi from string could also be used.
#include using namespace std; int main (int argc, char** argv) { if (argc >= 2) { int val = stoi(argv[1]); // ... } return 0; }