#ifndef A_H #define A_H #include<iostream> using namespace std; template <class T> class A { friend ostream& operator << (ostream& outs, const A<T>& object) { //definition goes here } //Other functions of class A } #endif //A_H
//the rest of the function definition of class A
#ifndef A_H #define A_H #include<iostream> using namespace std; template <class T> class A; template <class T> ostream& operator << (ostream& outs, const A<T>& object); class A { friend ostream& operator << <>(ostream& outs, const A<T>& object); //Other functions of class A } #endif //A_H
#ifndef A.CPP #define A.CPP //the friend function definition and other function definitions #endif //A.CPP
T
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)