STL VECTOR

S

Sue

I need to use STL vectors. Especially, I need limited number of vectors(more
than 10)

Is it possible to use array of STL vectors?

How to make it?
 
M

Marco Wahl

Sue said:
I need to use STL vectors. Especially, I need limited number of vectors(more
than 10)

Is it possible to use array of STL vectors?

It is possible to use an array of STL vectors.
How to make it?

Let's say your limit is 42.

The following program is an example for 42 vectors stored in an array.

[[[
#include <vector>
using std::vector;
int main() {
vector<short> v[42];
return 0;
}
]]]
 
J

Jacek Dziedzic

Sue said:
I need to use STL vectors. Especially, I need limited number of vectors(more
than 10)

Is it possible to use array of STL vectors?

Why not a STL vector of STL vectors?
How to make it?

std::vector< std::vector< foo > > bar;

HTH,
- J.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top