473,407 Members | 2,676 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

STL source code

abi
i would like to refer to the source code of container class list for a
project implementation of mine. all that i find on a goog search is
list of header files and discussion on the c++ issues like 'concept'
etc. around that idea.
where do i find the actual source code (lets say list.cc) that
actually defines all the classes.
all that i want to learn is the underlying 'raw algorithms' in the stl
implementation of certain containers and classes

thanks
abi
Jul 19 '05 #1
4 6270
On 3 Sep 2003 06:05:24 -0700, abi <ab**@myrealbox.com> wrote:
i would like to refer to the source code of container class list for a
project implementation of mine. all that i find on a goog search is
list of header files and discussion on the c++ issues like 'concept'
etc. around that idea.
Your subject was "STL source code".

The *first* match on a google search for those three words is a web page
linking to the source code of an implementation of list (and the rest
of the STL).

where do i find the actual source code (lets say list.cc) that
actually defines all the classes.


list is a template. It is almost certainly implemented in a header
file and not a .cc file (since "export" isn't implemented by enough
compilers to be used by such a downloadable implementation.

--
Sam Holden

Jul 19 '05 #2

"abi" <ab**@myrealbox.com> wrote in message
news:31**************************@posting.google.c om...
i would like to refer to the source code of container class list for a
project implementation of mine. all that i find on a goog search is
list of header files and discussion on the c++ issues like 'concept'
etc. around that idea.
where do i find the actual source code (lets say list.cc) that
actually defines all the classes.
all that i want to learn is the underlying 'raw algorithms' in the stl
implementation of certain containers and classes

thanks
abi


You will have noticed that all those containers of the C++ standard library
are templates. Thus you'll find their implementation in the header files.

HTH
Chris
Jul 19 '05 #3
abi
ya thanks,
i got the idea
but is there some other place on the web where only the algorithms
used by STL is
explained. (that is the underlying data structures etc. ) without
explicit reference to the code (as it is pretty confusing if I try to
read through).

thanks
Jul 19 '05 #4

"abi" <ab**@myrealbox.com> wrote in message
news:31*************************@posting.google.co m...
ya thanks,
i got the idea
but is there some other place on the web where only the algorithms
used by STL is
explained. (that is the underlying data structures etc. ) without
explicit reference to the code (as it is pretty confusing if I try to
read through).

thanks


The standard does not specify which algorithms the STL must use.
Implementers are free to choose which ever algorithm or data structure that
fulfils the functional and efficiency requirements of the standard.

There are some common choices however. For instance every implementation of
map, multimap, set and multiset that I have ever seen uses a structure
called a red black tree. Typing 'red black tree algorithm' in google
produces a number of likely looking links.

john
Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Tim Zhao | last post by:
I downloaded the PHP 5 source code from www.php.net web site. It is a tar compressed file. I used WinZip to unzip it. Now I got a whole bunch of files. But I do not know to read these files. Do...
9
by: FISH | last post by:
Ever have one of those days when you're not sure if it's you who's gone mad, or the rest of the world? I have an Open Source project on SourceForge for communication with YSMG - Yahoo's IM...
115
by: TheAd | last post by:
At this moment I use MsAccess and i can build about every databound application i want. Who knows about a serious open source alternative? Because Windows will be a client platform for some time, i...
4
by: kj | last post by:
I consider myself quite proficient in C and a few other programming languages, but I have never succeeded in understanding a largish program (such as zsh or ncurses) at the source level. ...
15
by: Fady Anwar | last post by:
Hi while browsing the net i noticed that there is sites publishing some software that claim that it can decompile .net applications i didn't bleave it in fact but after trying it i was surprised...
8
by: Alvo von Cossel I | last post by:
hey everybody, I have written a great browser but it is missing a feature (quite a lot actually, but forget about them for now). that feature just so happens to be the View > Source function....
7
by: Tina | last post by:
In 1.1 I used to use a WebControlLibrary to hold code I didn't want to expose when I distributed a component. The code would compile to a separate dll and could not be viewed when used in a vs.net...
66
by: Jon Skeet [C# MVP] | last post by:
I'm sure the net will be buzzing with this news fairly soon, but just in case anyone hasn't seen it yet: Microsoft are going to make the source code for the .NET framework (parts of it,...
4
by: Spizzat2 | last post by:
I'm trying to figure out a workaround to a minor annoyance that I'm coming up with while coding a site. I've got some keyboard shortcuts set up for the site via javascript, and when I press escape,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.