Question: * Convert a given char array into an integer vector * * Example input: * - [ t , c , q , v ,
Convert a given char array into an integer vector
Example input:
t c q v j
Example output:
Here is what I have so far... but the return that comes back has a ton of numbers instead of just the amount that corresponds with the input
static vector Testchar letters
create a vector to hold the results
vector result;
create a loop to loop thru the letters
for int i ; lettersi; i
result.pushbackstaticcastlettersi;
return result;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
