Template

i don't understand this piece of code..

 
template <class T> class Base : A<T>
Base is basically a templated class that derives from A w/c also is a templated class, the template argument for Base will be the same for A

1
2
3
4
5
6
7
template<class T>
  class A
{ };

template<class T>
  class B : private A<T>
{ };
Last edited on
nvrmnd wrote:
Base is basically a templated class that derives from A w/c also is a templated class
What does "w/c" mean?
bathroom (water closet)

please DEA
which (is there something wrong w/ my answer ??)
Last edited on
I've never seen "which" shortened as "w/c", as ne555 says all sources say "w/c" is shorthand for "watercloset" aka 'toilet'. Obviously I was confused as to the meaning of your post, but since you clarified that you meant "which" the confusion is gone.
In essence, it has to do with inheritance or not?
Edit: I undestrood..thanks for all guys! =)
Last edited on
Templates and inheritance are unrelated. It just so happens that the example you gave uses both.
Topic archived. No new replies allowed.