Solved

stl sort function

Posted on 2011-09-14
3
369 Views
Last Modified: 2012-08-14
Hi,

I am trying to find the stl's sort function code. Is there any available. The only one I can find is the .h files.

Thanks,
0
Comment
Question by:zizi21
3 Comments
 
LVL 31

Accepted Solution

by:
Zoppo earned 300 total points
ID: 36540979
Hi zizi21,

the 'sort' function is implemented in header <algorithm>. There aren't further source files since as it's implemented as function template it has to be implemented in the header.

ZOPPO
0
 
LVL 40

Assisted Solution

by:evilrix
evilrix earned 200 total points
ID: 36541012
There is no standard implementation. All the C++ standard does is define what sort must do but how it's implemented is up to the vendor. More often than not sort is implemented as a quick sort (but it doesn't have to be).
0
 

Author Closing Comment

by:zizi21
ID: 36546975
Thanks a million.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now