cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
Select one column or one line from a ma
Select one column or one line from a matrix
Apr 27, 2009 at 5:00pm UTC
vRltwE
(86)
Hi,
I am using matrix
vector<vector<
double
> > matrix_tmp( cols , vector<
double
>( lines ) );
How I select a specific column or line?
There is something like matrix.get_line(3) ou matrix.get_column(7)?
Apr 27, 2009 at 5:08pm UTC
helios
(17607)
Vectors of vectors don't have the concept of rows or columns. If you need to iterate through a row or column, just go through v[i][row] or v[column][i] respectively.
Topic archived. No new replies allowed.