Solved

stl sort function

Posted on 2011-09-14
3
374 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

726 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