stl in c++

F

fattaneh

hi all,

i want to make a list in c++ with stl

list<int> list1;
list1.push_back (value1);

i dont know how to make a Multi-dimensional list with it

i dont know what is the usage of stl i mean what else can i do with
it .
 
V

Victor Bazarov

i want to make a list in c++ with stl

list<int> list1;
list1.push_back (value1);

i dont know how to make a Multi-dimensional list with it

A "multi-dimensional list" is probably simply a list of lists of ...
Something like

list said:
i dont know what is the usage of stl i mean what else can i do with
it .

Plenty. But don't count on finding a source of information that would
enumerate *all you can do with STL*. Rather do it the other way: think
of what you need to do, and learn how to use STL to help you with that.

Find and get a copy of "The C++ Standard Library" by Nicolai Josuttis.

V
 
H

hanukas

hi all,

i want to make a list in c++ with stl

list<int> list1;
list1.push_back (value1);

i dont know how to make a  Multi-dimensional list with it

i dont know what is the usage of stl i mean what else can i do with
it .

Two-dimensional linked list? Sounds bizarre, you might be better off
with a custom container for this one unless the application is a toy
where it doesn't matter what you use. Can you describe the problem you
are trying to solve?

FYI: why I don't recommend list of list's is that traversing the
"grid" will be efficient only along one axis, I mean, if that's what
you want to achieve. The dilemma is that this arrangement doesn't seem
very efficient to anything: traversal is very limited, no indexed
access, memory overhead.. anyway you look at it it's just not that
good.

The problem seems more interesting that the solution. ;)
 

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
473,769
Messages
2,569,582
Members
45,059
Latest member
cryptoseoagencies

Latest Threads

Top