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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. newbie stl compiler error question

newbie stl compiler error question

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++question
5 Posts 2 Posters 4 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.
  • A Offline
    A Offline
    Alex Griffing
    wrote on last edited by
    #1

    Hi everyone! I'm trying to learn stl, resisting the temptation to reinvent the wheel repeatedly, but I'm running into an initial problem. typedef std::list SOCKLIST; function(SOCKLIST sockets_) { SOCKLIST::iterator it; for (it=sockets_.begin(); it &,const class std::list<_Ty,_A> &)' : could not deduce template argument for 'const class std::list<_Ty,_A> &' from 'class std::list

    A T 2 Replies Last reply
    0
    • A Alex Griffing

      Hi everyone! I'm trying to learn stl, resisting the temptation to reinvent the wheel repeatedly, but I'm running into an initial problem. typedef std::list SOCKLIST; function(SOCKLIST sockets_) { SOCKLIST::iterator it; for (it=sockets_.begin(); it &,const class std::list<_Ty,_A> &)' : could not deduce template argument for 'const class std::list<_Ty,_A> &' from 'class std::list

      A Offline
      A Offline
      Alex Griffing
      wrote on last edited by
      #2

      Ok sorry. the < should be a !=

      1 Reply Last reply
      0
      • A Alex Griffing

        Hi everyone! I'm trying to learn stl, resisting the temptation to reinvent the wheel repeatedly, but I'm running into an initial problem. typedef std::list SOCKLIST; function(SOCKLIST sockets_) { SOCKLIST::iterator it; for (it=sockets_.begin(); it &,const class std::list<_Ty,_A> &)' : could not deduce template argument for 'const class std::list<_Ty,_A> &' from 'class std::list

        T Offline
        T Offline
        Todd Smith
        wrote on last edited by
        #3

        You are missing a type typedef std::list SOCKLIST; where type can be int, char, string, a class, structure etc.

        T 1 Reply Last reply
        0
        • T Todd Smith

          You are missing a type typedef std::list SOCKLIST; where type can be int, char, string, a class, structure etc.

          T Offline
          T Offline
          Todd Smith
          wrote on last edited by
          #4

          The forum ate my code. Since it probably ate your code to I'm not sure if this is the correct answer to your problem. 'typedef std::list SOCKLIST;'

          A 1 Reply Last reply
          0
          • T Todd Smith

            The forum ate my code. Since it probably ate your code to I'm not sure if this is the correct answer to your problem. 'typedef std::list SOCKLIST;'

            A Offline
            A Offline
            Alex Griffing
            wrote on last edited by
            #5

            Yeah the forum ate my code. The type was, let's try to do this explicitly, typedef std::list<Socket *> SOCKLIST; but I fixed the problem, so it's OK. Thanks for the feedback!

            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