XLL+ Knowledge BaseXLL+ FAQs

PRB: error C2309: 'sort' : is not a member of 'std'

Reference: Q0013

Article Last Modified on 25-Jun-2004


The information in this article applies to:

error C2309: 'sort' : is not a member of 'std'

Question

In the XLL Plus help file under, XLL+ User Guide > Array results > Returning vectors to Excel, there is a sample function for sorting. When I copy that function into my project and try to compile it I get an error message that says error C2309: 'sort' : is not a member of 'std'. Can you tell me why I am getting this error and how to fix it?

Answer

Include the header file <algorithm>, which contains the sort alogorithm. e.g. :

#include <algorithm>


Copyright © Planatech Solutions Ltd 2002-2005. All trademarks are the properties of their respective owners.