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. A doubt about templates

A doubt about templates

Scheduled Pinned Locked Moved C / C++ / MFC
c++wpfcomtoolstutorial
6 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.
  • T Offline
    T Offline
    toxcct
    wrote on last edited by
    #1

    Hi All, I have a little doubt about templates, and no compiler to test this. Is it possible to have a template member function in a class that is not template, or even a global template function ?? i'm puzzling as i just thought to this... thanks for your answers guyz


    Don't know where to start ?
    Refer the Forums Guidelines and ask a friend

    [VisualCalc 3.0][Flags Beginner's Guide]

    S R N 3 Replies Last reply
    0
    • T toxcct

      Hi All, I have a little doubt about templates, and no compiler to test this. Is it possible to have a template member function in a class that is not template, or even a global template function ?? i'm puzzling as i just thought to this... thanks for your answers guyz


      Don't know where to start ?
      Refer the Forums Guidelines and ask a friend

      [VisualCalc 3.0][Flags Beginner's Guide]

      S Offline
      S Offline
      sunit5
      wrote on last edited by
      #2

      yes :-O

      never say die

      T 1 Reply Last reply
      0
      • S sunit5

        yes :-O

        never say die

        T Offline
        T Offline
        toxcct
        wrote on last edited by
        #3

        that's a very pragmatic answer, but thanks ! lol


        Don't know where to start ?
        Refer the Forums Guidelines and ask a friend

        [VisualCalc 3.0][Flags Beginner's Guide]

        1 Reply Last reply
        0
        • T toxcct

          Hi All, I have a little doubt about templates, and no compiler to test this. Is it possible to have a template member function in a class that is not template, or even a global template function ?? i'm puzzling as i just thought to this... thanks for your answers guyz


          Don't know where to start ?
          Refer the Forums Guidelines and ask a friend

          [VisualCalc 3.0][Flags Beginner's Guide]

          R Offline
          R Offline
          Roger Stoltz
          wrote on last edited by
          #4

          toxcct wrote:

          Don't know where to start ? Refer the Forums Guidelines and ask a friend

          ;) (Couldn't resist...) The answer to your question is 'yes' and Google-ing for "template function" generated these[^] results where the first result screen contains links for code examples of at least template functions that are not class members.


          "It's supposed to be hard, otherwise anybody could do it!" - selfquote

          T 1 Reply Last reply
          0
          • R Roger Stoltz

            toxcct wrote:

            Don't know where to start ? Refer the Forums Guidelines and ask a friend

            ;) (Couldn't resist...) The answer to your question is 'yes' and Google-ing for "template function" generated these[^] results where the first result screen contains links for code examples of at least template functions that are not class members.


            "It's supposed to be hard, otherwise anybody could do it!" - selfquote

            T Offline
            T Offline
            toxcct
            wrote on last edited by
            #5

            Roger Stoltz wrote:

            (Couldn't resist...)

            :doh::laugh: shame on me ! lol actually, i asked here because i know that Valuable programmers are here, and will be able to explain things easily.


            Don't know where to start ?
            Refer the Forums Guidelines and ask a friend

            [VisualCalc 3.0][Flags Beginner's Guide]

            1 Reply Last reply
            0
            • T toxcct

              Hi All, I have a little doubt about templates, and no compiler to test this. Is it possible to have a template member function in a class that is not template, or even a global template function ?? i'm puzzling as i just thought to this... thanks for your answers guyz


              Don't know where to start ?
              Refer the Forums Guidelines and ask a friend

              [VisualCalc 3.0][Flags Beginner's Guide]

              N Offline
              N Offline
              Nibu babu thomas
              wrote on last edited by
              #6

              toxcct wrote:

              even a global template function

              If I got you right you can have global template functions.


              Nibu thomas A Developer Programming tips[^]  My site[^]

              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