0
Iteration of int like string (Python -> C++)
How to do this on C++ ? number=5342 for a in str(number): my_function(int(a))
1 Resposta
+ 1
#include <cstdlib>
for (char c : itoa(number))
my_function (stoi(c));
How to do this on C++ ? number=5342 for a in str(number): my_function(int(a))