954,499 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

2D Vector Advice

Hi all,

I ve been seeking a tutorial,article etc. about 2D cliext::vector . These are using library and cliext namespace.
At once i need 2d vector decleration and its
erase method to remove all rows which are full of zeros.

Any help 'll be greatly appreciated.

sota
Newbie Poster
11 posts since Feb 2012
Reputation Points: 10
Solved Threads: 0
 

This isn't a work-around for your earlier question , is it?

If so, there is an easier way.

thines01
Postaholic
Team Colleague
2,424 posts since Oct 2009
Reputation Points: 445
Solved Threads: 402
 
If so, there is an easier way.

Yes it is , show it please

sota
Newbie Poster
11 posts since Feb 2012
Reputation Points: 10
Solved Threads: 0
 

I posted somehing in the other thread.

thines01
Postaholic
Team Colleague
2,424 posts since Oct 2009
Reputation Points: 445
Solved Threads: 402
 

Thines01, finally i need a 2D vector in managed C++. Could you tell me such a structure exists or not ?

sota
Newbie Poster
11 posts since Feb 2012
Reputation Points: 10
Solved Threads: 0
 

Hi,unfortunatly there is no such thing as a 2D cliext::vector in msdn. I will go on with 2D STL vector type.

#include "vector"
using namespace std;

vector<vector<int>> int_vector(2,vector<int>(2));
sota
Newbie Poster
11 posts since Feb 2012
Reputation Points: 10
Solved Threads: 0
 

Sort of...

List<List<int>^>^ lst_lst_intData = gcnew List<List<int>^>();
thines01
Postaholic
Team Colleague
2,424 posts since Oct 2009
Reputation Points: 445
Solved Threads: 402
 
Sort of...

Allright but it is a kind of 1D structure which has a bigger library than vector type.
How can it be used in place of a 2D vector !?

sota
Newbie Poster
11 posts since Feb 2012
Reputation Points: 10
Solved Threads: 0
 

What I was showing is a List inside of another List.
...2 dimensional.

thines01
Postaholic
Team Colleague
2,424 posts since Oct 2009
Reputation Points: 445
Solved Threads: 402
 

ssht. Many thanks.

sota
Newbie Poster
11 posts since Feb 2012
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: