+ 1
command line arguments
how to convert command line arguments to integers?
1 Réponse
0
You need convert char[] to int.
#include <stdlib.h> //atoi
char string[] = "3012";
int sum = atoi(string);
std::cout << sum; //3012 - this int
how to convert command line arguments to integers?