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. Template classes in VS

Template classes in VS

Scheduled Pinned Locked Moved C / C++ / MFC
visual-studioquestion
6 Posts 3 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.
  • J Offline
    J Offline
    jparsons
    wrote on last edited by
    #1

    I added a template class to one of my projects and none of the methods that I defined are showing up in the class view. Everything compiles cleanly with no errors and I've included all of the proper header files but only data members show up. I know I'm missing something simple. Any suggestions? Jared jparsons@jparsons.org www.prism.gatech.edu/~gte477n

    C A 2 Replies Last reply
    0
    • J jparsons

      I added a template class to one of my projects and none of the methods that I defined are showing up in the class view. Everything compiles cleanly with no errors and I've included all of the proper header files but only data members show up. I know I'm missing something simple. Any suggestions? Jared jparsons@jparsons.org www.prism.gatech.edu/~gte477n

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Are they public ? Why are you exposing your data members ? Does the code compile, even though class wizard is broken ? Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
      C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
      Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002

      J 1 Reply Last reply
      0
      • C Christian Graus

        Are they public ? Why are you exposing your data members ? Does the code compile, even though class wizard is broken ? Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
        C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
        Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002

        J Offline
        J Offline
        jparsons
        wrote on last edited by
        #3

        All of the methods are public. The data members are protected but they show up in the class view correctly. I've done a complete rebuild and it has no errors or warnings. Jared jparsons@jparsons.org www.prism.gatech.edu/~gte477n

        1 Reply Last reply
        0
        • J jparsons

          I added a template class to one of my projects and none of the methods that I defined are showing up in the class view. Everything compiles cleanly with no errors and I've included all of the proper header files but only data members show up. I know I'm missing something simple. Any suggestions? Jared jparsons@jparsons.org www.prism.gatech.edu/~gte477n

          A Offline
          A Offline
          Abin
          wrote on last edited by
          #4

          If you are using VC++ 6, yes, that is the case. For any template classes, only member data and inline methods will show up in class-view or auto-completion menus, and no, there is no solution, a future patch from Microsoft is our only hope.

          J 2 Replies Last reply
          0
          • A Abin

            If you are using VC++ 6, yes, that is the case. For any template classes, only member data and inline methods will show up in class-view or auto-completion menus, and no, there is no solution, a future patch from Microsoft is our only hope.

            J Offline
            J Offline
            jparsons
            wrote on last edited by
            #5

            Thanks for your reply. Maybe I'll just make all of hte functions inline so that I can see the auto-complete. I did have some limited success with two of my methods showing up. Neither of them were inline, but one of htem had default parameters and the other was an overload. As long as I left one of them with a default parameter both would show up in the auto-complete menu. Jared jparsons@jparsons.org www.prism.gatech.edu/~gte477n

            1 Reply Last reply
            0
            • A Abin

              If you are using VC++ 6, yes, that is the case. For any template classes, only member data and inline methods will show up in class-view or auto-completion menus, and no, there is no solution, a future patch from Microsoft is our only hope.

              J Offline
              J Offline
              jparsons
              wrote on last edited by
              #6

              I added AFX_INLINE to all of the methods in the file and that fixed the problem. Is there any logic behind this, or is it just and oddity? Jared jparsons@jparsons.org www.prism.gatech.edu/~gte477n

              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