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. CList, POSITION and template pointers

CList, POSITION and template pointers

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
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.
  • X Offline
    X Offline
    Xavier Shay
    wrote on last edited by
    #1

    How do you declare a pointer to a template? I'm trying to make a clone of the CList class, and cannot figure out how they have defined the POSITION type. in list.h (search for 'clist' in the MSDN library), it is defined thusly: #define POSITION CNode* This works for all class methods of my CList and CNode, however when I try and use it in code I get a "TYPE undeclared" error. Suggestions? - Xavier

    A 1 Reply Last reply
    0
    • X Xavier Shay

      How do you declare a pointer to a template? I'm trying to make a clone of the CList class, and cannot figure out how they have defined the POSITION type. in list.h (search for 'clist' in the MSDN library), it is defined thusly: #define POSITION CNode* This works for all class methods of my CList and CNode, however when I try and use it in code I get a "TYPE undeclared" error. Suggestions? - Xavier

      A Offline
      A Offline
      Alexandru Savescu
      wrote on last edited by
      #2

      I hope I am answering this before CG. :) Why do you have to reinvent the wheel? Use std::list Best regards, Alexandru Savescu P.S. Interested in art? Visit this!

      X 1 Reply Last reply
      0
      • A Alexandru Savescu

        I hope I am answering this before CG. :) Why do you have to reinvent the wheel? Use std::list Best regards, Alexandru Savescu P.S. Interested in art? Visit this!

        X Offline
        X Offline
        Xavier Shay
        wrote on last edited by
        #3

        Learning purposes, although I haven't looked at std::list, maybe that will shed some light. Thanks. - Xavier

        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