/* -*- C++ -*- */ /************************************************************************* * Copyright(c) 1995~2005 Masaharu Goto (root-cint@cern.ch) * * For the licensing terms see the file COPYING * ************************************************************************/ #include template class A { public: int x; A() ; void f(); }; template A::A() { x=1; } template void A::f() { printf("A::f=%d\n",x); } class B { public: double b; B(); void g(); }; B::B() { b=3.14; } void B::g() { printf("B::b=%g\n",b); } class C { public: A a; }; int main() { A a; a.f(); B b; b.g(); C c; c.a.f(); printf("nstmplt1\n"); return 0; }