I have a string of number and I want to convert each number into integer type then add it into a vector.
#include<bits/stdc++.h>
#include<string>
#include<vector>
using namespace std;
int main() {
vector<int> vec;
string num;
cin >> num;
for(int i = 0; i <= num.length(); i++){
vec.push_back(stoi(num[i]));
}
return 0;
}
it said error: no matching function for call to stoi