View Single Post
Old 05-14-2003, 11:24 PM   #5 (permalink)
Unicorn
Registered User
 
Unicorn's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 11
Unicorn is on a distinguished road
Quote:
if it's my apvector include file, where can I get the vector include file...
It's a standard class, just #include <vector>

Quote:
can I have the inner vector have a name?
Nope, it's a template argument.

Quote:
Or would that require a struct?
If you want it to have a name, indeed you'll need a struct with just one member (the vector<int> named jerry). Harry would then be a vector of those structs.

Quote:
And how do I call it? Either harry[3][2]
That's the one. Don't forget to allocate enough space in your inner vectors as well:

Code:
apvector<apvector<int> > Harry (5);

Harry[0].resize (20);
Harry[1].resize (12);
(etc.)
Unicorn is offline   Reply With Quote