Newsgroup: it.comp.lang.c++
Titolo: help! (long)

sto' cercando di compilare un source ma mi da' quest'errore:
c:\programmi\microsoft sdk\include\rpcndr.h(2949) : error C2955:
'Pointer' : use of class template requires template argument list
        c:\include\client\pointer.h(147) : see declaration of
'Pointer'
premetto che ho messo le platform sdk che chiedeva il sorgente e che
il compilatore visual c++ è settatto giusto qui sotto vi metto anche
il pointer.h
se qualcuno sà come aiutarmi e' ben accetto! :) grazie
#if !defined(AFX_POINTER_H__FCC38D23_858F_43AC_BF23_73FD708FDC82__INCLUDED_)
#define AFX_POINTER_H__FCC38D23_858F_43AC_BF23_73FD708FDC82__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class PointerBase
{
public:
	void inc() throw() {
		dcassert(ref>=0);
		Thread::safeInc(&ref);
	}
	void dec() throw() {
		dcassert(ref>0);
 
		if ( (Thread::safeDec(&ref)) == 0 ) {
			//dcdebug("Smart Object at 0x%08x deleted\n", this);
			delete this;
		}
	}
	bool unique() throw() {
		return (ref == 1);
	}
 
protected:
	PointerBase() throw() : ref(0) { };
 
	virtual ~PointerBase() throw() {
		dcassert(!ref);
	}
private:
	long ref;
};
/**
 * Note; don't forget to make the destructor virtual if deriving from
this class
 */
template <class T>
class Pointer
{
public:
	Pointer ( PointerBase *aBase = 0) throw() : base(aBase) {	
		if ( base ) {
			base->inc();
		}
	}
 
	Pointer( const Pointer &rhs ) throw() : base(rhs.base) {	   
		if ( base ) {
			base->inc();
		}
	}
 
	Pointer &operator =( const Pointer &rhs ) throw() {
		if ( rhs.base ) {
			rhs.base->inc();
		}
 
		if ( base ) {
			base->dec();
		}
 
		base = rhs.base;
		return *this;
	}
	Pointer &operator =( T* rhs ) throw() {
		if (rhs) {
			rhs->inc();
			if ( base ) {
				base->dec();
			}
			base = rhs;
		}
 
 
		return *this;
	}
 
	~Pointer() throw() { 
		if ( base ) {
			base->dec();
		}
	}
 
	T*			operator->()		  { return		asT();	}
	T&			operator* ()		  { return	   *asT();	}
	const T*	operator->()  const   { return		asT();	}
	const T&	operator* ()  const   { return	   *asT();	}
 
	operator		  bool()  const   { return base != NULL; }
 
	bool operator==(T* rhs) const { return (T*)base == rhs; };
	bool operator==(const Pointer& rhs) const { return base == rhs.base;
};
	bool operator<(T* rhs) const { return (T*)base < rhs; };
	bool operator<(const Pointer& rhs) const { return base < rhs.base; };
	bool operator>(T* rhs) const { return (T*)base > rhs; };
	bool operator>(const Pointer& rhs) const { return base > rhs.base; };
 
	static void swap ( Pointer &lhs, Pointer &rhs ) {
		PointerBase *temp = lhs.base;
		lhs.base = rhs.base;
		rhs.base = temp;
	}
 
	void release() {
		if ( base ) {
			base->dec();
			base = 0;
		}
	}
private:
	PointerBase* base;
 
	T* asT () {	
		dcassert(base);
		return (T*)base;	
	}
	const T* asT()	const {	
		dcassert(base);
		return (T*)base;	
	}
};
template <class T>
bool operator==(T* lhs, const Pointer<T>& rhs) { return rhs == lhs; };
template <class T>
bool operator<(T* lhs, const Pointer<T>& rhs) { return rhs > lhs; };
template <class T>
bool operator>(T* lhs, const Pointer<T>& rhs) { return rhs < lhs; };
template <class T>
struct DeleteFunction {
	void operator()(T& p) const { delete p; };
};
#endif // !defined(AFX_POINTER_H__FCC38D23_858F_43AC_BF23_73FD708FDC82__INCLUDED_)


probabilmente il nome Pointer è stato già definito nell'header indicato:
prova a cambiare nome
Pela