|
-
December 7th, 2002, 10:08 AM
#1
Problem with function template
Hi!
I got a problem related to templates, something is not quite working the way it should:
template <int SIZE> void Func( void )
{
cout << SIZE << endl;
}
int main( void )
{
Func<2>();
Func<8>();
}
The output I get is
8
8
and I don't understand why. Shouldn't it be
2
8
as a separate function should be created for each call ???
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|