Article ID: 131066
Article Last Modified on 7/5/2005
/* Compile options : /Ze ( default option )
*/
#include <iostream.h>
template <class T> class A; // Forward declaration
// Change the following line from a comment into an executed line to
// prevent the compiler error with Visual C++, 32-bit edition, version 2.0
// or 2.1:
// template <class T> ostream& operator<< (ostream &s, const A<T> &b);
template <class T>
class A {
public:
friend ostream & operator << (ostream &s, const A<T> &b);
};
template <class T> ostream& operator<< (ostream &s, const A<T> &b)
{
return s << "testing";
}
void main()
{
A<int> fa;
cout << fa;
}
Additional query words: 2.00 2.10 8.0 8.00 8.0c 8.00c 9.0 9.00 9.1 9.10
Keywords: kberrmsg kbprb kbcpponly kbcompiler KB131066