Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ > default templat...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 44035 of 48022
Post > Topic >>

default template

by kvnil <kvnil@[EMAIL PROTECTED] > Mar 21, 2008 at 08:44 AM

Let's say I have a template

template<int S = 4096>
struct A {
....
}
 
why can't be used as just A? For example, see the following program (which

doesn't compile because "A" is used instead, of A<10>, for instance):

template <int S=4096> struct A { enum {size = S}; };

int main(int argc, char* argv[]) { 
 printf("%d\n",A::size); 
}

Thanks, Kev
 




 2 Posts in Topic:
default template
kvnil <kvnil@[EMAIL PR  2008-03-21 08:44:32 
Re: default template
"White Wolf" &l  2008-03-21 17:16:20 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Oct 14 11:28:48 CDT 2008.