Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multi dimensional vectors

Status
Not open for further replies.

koolcjay

Programmer
Oct 26, 2002
3
US
Can someone please explain to me how to create a vector of vectors that supports different types eg. char, int

thank you
 
Try this :
vector<vector<int> > my_vec;

Remember a space between the closing angles.
/JOlesen
 
Thanks for the reply, but what i was actually trying know is how to create a function template that will overload such vector eg vector<vector<T> >, if it is possible.

i have to read in some values into a 3D vector. the first 2 columns will be <int> but the last column has to be a <char> is there any way i can do that?

thank you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top