templates question

  • (2 Pages)
  • +
  • 1
  • 2

15 Replies - 329 Views - Last Post: 09 February 2012 - 05:45 AM Rate Topic: -----

Topic Sponsor:

#16 sepp2k  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 621
  • View blog
  • Posts: 1,038
  • Joined: 21-June 11

Re: templates question

Posted 09 February 2012 - 05:45 AM

Yes, you can take pointers as template arguments, but you can only use values as template arguments that are known at compile-time. Since the address of a local variable is not known at compile-time, you can't use pointers to local variables as template arguments. You can use pointers to global variables or pointers to functions though.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2