Larry I Smith wrote:[color=blue]
> Marcin Szewczyk (Wodny) wrote:[color=green]
>>=============================================
>>Errors:
>>=============================================
>>In instantiation of `lista_iter<char*>':
>>lista_iter.cpp:22: instantiated from here
>>lista_iter.cpp:13: template-id
>> `operator+<>' for `lista_iter<char*> operator+(const lista_iter<char*>&,
>> const lista_iter<char*>&)' does not match any template declaration
>>lista_iter.cpp:12: template-id
>> `operator<< <>' for `std::basic_ostream<char, std::char_traits<char> >&
>> operator<<(std::basic_ostream<char, std::char_traits<char> >&, const
>> lista_iter<char*>&)' does not match any template declaration
>>=============================================
>>Program:
>>=============================================
>>
>>#include <iostream>
>>
>>using namespace std;
>>
>>template <class T>
>>class lista_iter{
>> protected:
>> int wezel_;
>> public:
>> lista_iter() : wezel_(0) { };
>> int szukaj(T, int);
>> friend ostream& operator<< <> (ostream&, const lista_iter<T> &);
>> friend lista_iter<T> operator+ <> (const lista_iter<T> &, const
>>lista_iter<T> &);
>>};
>>
>>template <class T>
>>int lista_iter<T>::szukaj(T a, int b){
>> return 0;
>>}
>>[/color]
>
>
> Move the following specialization so that it appears after
> all of the operator<< and operator+ templates have been defined
> (i.e. move it just before main()). The compiler is trying to
> instantiate a lista_iter<char*>, but the compiler has not yet
> read the code for all of the required operators because they
> appear later in the source file.[/color]
Thank You very much. Why is it so simple :-) ?!
--
Wodny
Marcin Szewczyk
http://www.wodny.prv.pl wodny@21%_w_atmosferze.pl
GG:4624915