C++ Data Structure???

R

Rashrashetta

I am an intermediate programmer and I have a question about the C++
Data Structures.What are the built-in data structures available in C++
rather than the arrays??I would like specifically to ask about the
StackS,QueueS and the Linked ListS,are there namespaces that I can
include to use directly?And if yes,what are the names of these classes
or namespaceS???
Best Regards,
 
P

Phlip

Rashrashetta said:
I am an intermediate programmer and I have a question about the C++
Data Structures.What are the built-in data structures available in C++
rather than the arrays??I would like specifically to ask about the
StackS,QueueS and the Linked ListS,are there namespaces that I can
include to use directly?And if yes,what are the names of these classes
or namespaceS???

You are asking about the Standard Template Library (STL), and its iterators,
containers, and algorithms. Use Google.com to look them up. They will
provide many hours of fun.
 
M

Mike Wahler

Rashrashetta said:
I am an intermediate programmer and I have a question about the C++
Data Structures.What are the built-in data structures available in C++
rather than the arrays??

The container types of the standard library.

Sequence containers:
'std::deque'
'std::list'
'std::vector'

Sequence container adapters:
'std::queue'
'std::priority_queue'
'std::stack'

Associative containers:
'std::bitset'
'std::map'
'std::multimap'
'std::set'
'std::multiset'

Read about them in a good C++ textbook. The best book about
the C++ standard library I know of is:
www.josuttis.com/libbook

I would like specifically to ask about the
StackS,QueueS and the Linked ListS,are there namespaces that I can
include to use directly?

All standard library names (except macros) are declared
in namespace 'std'.
And if yes,what are the names of these classes
or namespaceS???

See above.

-Mike
 
R

rossum

I am an intermediate programmer and I have a question about the C++
Data Structures.What are the built-in data structures available in C++
rather than the arrays??I would like specifically to ask about the
StackS,QueueS and the Linked ListS,are there namespaces that I can
include to use directly?And if yes,what are the names of these classes
or namespaceS???
Best Regards,

You need to look at the Standard Library, in particular the bit of it
that used to be known as the Standard Template Library (STL).

This has various containers: vector, list, deque, set, map, string and
others. One or more of these should be what you want. All of them
are in the std namespace.

For an on-line STL reference look at http://www.sgi.com/tech/stl/

If you prefer dead trees then look for "The C++ Standard Library" by
Nicolai Josuttis.


rossum
 

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

Forum statistics

Threads
474,175
Messages
2,570,947
Members
47,498
Latest member
yelene6679

Latest Threads

Top