Hi guys,im kinda new to c++,need your help a little bit
I have a string called "digits" which is used for operations with big integers,
i made a vector out of that string,but that vector is char vector,
and i need it to be a vector of integers so i can operate with it?
Anyone can help ?
string digits("432234123");
vector<char> v(digits.begin(), digits.end()); and now i need to convert it but duunno how,
// Example program
#include <iostream>
using std::cout;
#include <string>
using std::string;
#include <vector>
using std::vector;
int main()
{
string digits("432234123");
vector<int> v(digits.begin(), digits.end());
for(auto& i : v)
i -= '0'; // make digits to numbers
for(constauto& i : v)
std::cout << i << '\n'; // print digits
}