Can anyone help me in trying to figure out how to create and display a matrix using vectors? Totally confused on this subject.

Printable View

- 09-02-2001tony1matrix
Can anyone help me in trying to figure out how to create and display a matrix using vectors? Totally confused on this subject.

- 09-02-2001Witch_King
I don't mean to mess up this thread. I'm rather new to C++. In standard C you could use a two dimentional array to represent a matrix, such as:

Code:`char matrix[10[10];`

vector<type> allocator

I can see how someone could use the string class like this:

vector<string> v_string;

Or maybe you could do something like this:

Code:`typedef struct`

{

char matrix[10][10]

}matrix_t;

vector<matrix_t> v_matrix;