I have an int and I would like to convert it to a vector<char>.
For example:
std::vector<char> MyVct;
int i = 2046;
So I want a vector of size 4 which will have:
MyVct[0] = '2';
MyVct[1] = '0';
MyVct[2] = '4';
MyVct[3] = '6';
How can I do it in the most efficent way ?
Do this: