Click here to Skip to main content
15,908,115 members
Articles / Programming Languages / C++

Passing a const character * as a template argument

Rate me:
Please Sign up or sign in to vote.
4.20/5 (2 votes)
3 Jul 2011CPOL 5.2K  
Since you must pass the string at each instanciation points, it is useless to make a template argument for it.templatestruct CVHDialogTmpl{ CVHDialogTmpl(const char *ptr_) : ptr(ptr_) { } INT_PTR DoModal() { return t.DoModal(ptr); } Ty t; ...

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Canada Canada
Programmer at Maid LABS from 2003 (www.maidlabs.com)

Programmer-Analyst at Viasat Geo Technoligies from 1995 to 2002 (www.viasat-geo.com).

I have studied at École Polytechnique de Montréal in computer engineering.

Comments and Discussions