I am trying to compare to integer lengths in terms of their digit lengths, and padding out the smallest one with 0's so they are both the same size, ie:
6 and 1500
becomes
0006 and 1500
I cannot get std::stoi to work, to then check the length of each number.
#include <iostream>
#include <vector>
#include <string>
using namespace std;
int schoolMethod(int a, int b, int base){
if(std::stoi(a)<std::stoi(b)){
//do stuff
return 0;
}
}
karatsuba.cpp: In function ‘int schoolMethod(int, int, int)’:
karatsuba.cpp:50: error: ‘stoi’ is not a member of ‘std’