Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. std::sort(....) -> error C2039: 'sort' : is not a member of 'std'

std::sort(....) -> error C2039: 'sort' : is not a member of 'std'

Scheduled Pinned Locked Moved C / C++ / MFC
helpgraphicsquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    whofmans
    wrote on last edited by
    #1

    Hi, I try to compile this code: std::sort(actionlist.begin(), actionlist.end(), compareActionlist); actionlist is a vector. But i get this error: error C2039: 'sort' : is not a member of 'std' I have tried to put using namespace std in the top, but that doesn't help. Can someone help me? Thanks!

    C 1 Reply Last reply
    0
    • W whofmans

      Hi, I try to compile this code: std::sort(actionlist.begin(), actionlist.end(), compareActionlist); actionlist is a vector. But i get this error: error C2039: 'sort' : is not a member of 'std' I have tried to put using namespace std in the top, but that doesn't help. Can someone help me? Thanks!

      C Offline
      C Offline
      Chris Losinger
      wrote on last edited by
      #2

      have you done this:

      #include < algorithm >

      ?


      WWT2D?

      Fractals

      W 1 Reply Last reply
      0
      • C Chris Losinger

        have you done this:

        #include < algorithm >

        ?


        WWT2D?

        Fractals

        W Offline
        W Offline
        whofmans
        wrote on last edited by
        #3

        Thanks, i get now some other errors but i think i can make it.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups