Converting command-line arguments to ints - C++ Function

C++ examples for Function:main function

Description

Converting command-line arguments to ints

Demo Code

#include <iostream>
#include <cstdlib>
using namespace std;
int main(int argc, char* argv[]) {
   for(int i = 1; i < argc; i++)
      cout << atoi(argv[i]) << endl;
}

Related Tutorials