Hi, currently I'm having a problem on converting a string type array into a char type. An example is as follows:
string fruits[20];
vector <char> temp;
The fruits array HAS to be a string type and temp vector HAS to be a char type. This can't be changed. So I've a problem on storing the element of fruits array into temp vector as follows:
temp.push_back( fruits[0]); <-----I know this is wrong.
So can I know how to convert string array into char type? Thank you
string fruits[20];
vector <char> temp;
The fruits array HAS to be a string type and temp vector HAS to be a char type. This can't be changed. So I've a problem on storing the element of fruits array into temp vector as follows:
temp.push_back( fruits[0]); <-----I know this is wrong.
So can I know how to convert string array into char type? Thank you
Comment