i want to make class A friend of class B, so when i declare an instance of A within B its private members will also in handy. but things go wrongly when i compile it, my code is right below:
i just can not figure out the problem, any ideas ?Code:template <class T> class A { friend B<T>; public: // private: T data; }; template <class T> class B { public : // private: A<T>* a; }
btw, i am with Dev-C++ 5, thanx.