Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template <class T>
- class A{
- protected:
- T i;
- };
- template <class T>
- class B : public A<T>{
- T geti() {return i;}
- };
- template <class T>
- class B : public A<T>{
- T geti() {return A<T>::i;}
- };
- template <typename T> struct B {
- int m;
- int n;
- int f ();
- int g ();
- };
- int n;
- int g ();
- template <typename T> struct C : B<T> {
- void h ()
- {
- m = 0; // error
- f (); // error
- n = 0; // ::n is modified
- g (); // ::g is called
- }
- };
- template <typename T> void C<T>::h ()
- {
- this->m = 0;
- this->f ();
- this->n = 0
- this->g ();
- }
Add Comment
Please, Sign In to add comment