Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class B;
- template<class T>
- class A {
- B* bp;
- public:
- T x;
- A(T _x) {x = _x; bp = new B(); }
- T f() {
- return bp->f();
- }
- };
- class B {
- A<int>* ap;
- public:
- int f() {
- return 0;
- }
- };
- int main() {
- A<int> a(0);
- return a->f();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement