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.
General Discussion
- Caffeine Lounge
- Corner Cubicle
- Student Campus
- Software Development
- Industry News
- Introduce Yourself
- Nightmare.In.Code
Programming Help
- C and C++
- VB6
- Java
- VB.NET
- C#
- ASP.NET
- .NET Framework
- PHP
- Ruby
- Python
- ColdFusion
- Databases
- Other Languages
- Game Development
- Mobile Development
- 52 Weeks Of Code
Web Development
- Web Development
- HTML & CSS
- JavaScript
- Graphic Design
- Flash & ActionScript
- Blogging
- SEO & Advertising
- Web Servers & Hosting
- Site Check
Follow & Share
C++ Tutorials
- File input using sentinels to control input of variable-length records
- [c++11] Fun with functions
- BitMap Printing Tutorial in C++ Win32
- Putting a Program Icon in the System Tray with C++
- How to put BitMaps onto Menu's In C++
- FOR loops (conditional loops)
- [C++0x]Memory management and Smart pointers
- Introduction to : Creating a Php extension for windows
- do {} while(0);
- Detect Windows Version With WIN API
- 321 More C++ Tutorials...
Reference Sheets
C++ Snippets
- Linked List Class
- Insertion Sort Example
- Recursive Fibonacci Sequence
- C++ calculator
- integer to string conversion
- C++ Int to String
- Finding Square Root without using sqrt()
- Getting Current Directory
- Convert cases of strings
- Shortest Function to Reverse a String ( Uses Recursion )
- 939 More C++ Snippets...
DIC Chatroom
Bye Bye Ads
Monthly Drawing

New Topic/Question
Reply




MultiQuote
|