Vector Assistance

I need to convert a string to a matrix using a vector.

Say the string is 6 characters long and holds:
h, e, l, l, o, w.

I need to copy that string into a vector that has 2 rows and 3 columns.

How do I do this?

do I use push_back and a for loop?
like message.push_back(string[i]) or something? (It didn't work).

Note: This is not a homework problem, I am trying to make a program that encodes and decodes messages using matrices
Last edited on
Topic archived. No new replies allowed.