Solved

stl sort function

Posted on 2011-09-14
3
373 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

Suggested Solutions

Title # Comments Views Activity
Move constructor only called if marked noexcept? 6 122
Issues with C++ Class 19 119
Are the two lines the same? If not what is the difference? 2 30
COM server issue 2 24
Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
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 additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

734 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