If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Re: C++ templates without arguments

I am using VS 2008 , however you are right when I cleaned the project and rebuild it does not work. ( however your code works fine ) however I still don't understand why template are being used this way , to my understanding the whole idea of template is create a generic framework which can be applied to any data type.

Re: C++ templates without arguments

Originally Posted by aamir121a

... which can be applied to any data type.

This isn't entirely true.
Templates are not required to work for "any type", they are work for any type that is compatible with what the templated is designed for.
The compiler will "try" to substitute whatever type you provide as template parameter, but this can very much result in a compiler error if this type doesn't conform to what the template expects.