command line arguments | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

command line arguments

how to convert command line arguments to integers?

22nd Sep 2018, 4:00 PM
Adriel Murray
1 Answer
0
You need convert char[] to int. #include <stdlib.h> //atoi char string[] = "3012"; int sum = atoi(string); std::cout << sum; //3012 - this int
22nd Sep 2018, 6:28 PM
Lair