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. typename/class [modified]

typename/class [modified]

Scheduled Pinned Locked Moved C / C++ / MFC
questionwpf
5 Posts 4 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.
  • K Offline
    K Offline
    knoxplusplus
    wrote on last edited by
    #1

    Please say me what is the difference betweem typename and class in templates ? Thanks. -:KNOX:- -- modified at 9:11 Wednesday 28th June, 2006

    _ V Z 3 Replies Last reply
    0
    • K knoxplusplus

      Please say me what is the difference betweem typename and class in templates ? Thanks. -:KNOX:- -- modified at 9:11 Wednesday 28th June, 2006

      _ Offline
      _ Offline
      _AnsHUMAN_
      wrote on last edited by
      #2

      AFAIK one difference is that 1)'typename' can only be used in template definitions. 2) 'class' - could be for both class and template definitions. Somethings seem HARD to do, until we know how to do them. ;-) _AnShUmAn_

      1 Reply Last reply
      0
      • K knoxplusplus

        Please say me what is the difference betweem typename and class in templates ? Thanks. -:KNOX:- -- modified at 9:11 Wednesday 28th June, 2006

        V Offline
        V Offline
        Viorel
        wrote on last edited by
        #3

        I think they both have the same effect when are used in template declaration: template< class T > ... can be replaced with: template< typename T > ... But typename keyword has one more meaning when is used within the declared template class. -- modified at 9:32 Wednesday 28th June, 2006

        K 1 Reply Last reply
        0
        • V Viorel

          I think they both have the same effect when are used in template declaration: template< class T > ... can be replaced with: template< typename T > ... But typename keyword has one more meaning when is used within the declared template class. -- modified at 9:32 Wednesday 28th June, 2006

          K Offline
          K Offline
          knoxplusplus
          wrote on last edited by
          #4

          Thanks for the help.:cool: -:KNOX:-

          1 Reply Last reply
          0
          • K knoxplusplus

            Please say me what is the difference betweem typename and class in templates ? Thanks. -:KNOX:- -- modified at 9:11 Wednesday 28th June, 2006

            Z Offline
            Z Offline
            Zac Howland
            wrote on last edited by
            #5

            When dealing with templates, there is no difference between them. If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week Zac

            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