Connecting Tech Pros Worldwide Forums | Help | Site Map

looking for version of portfwd ported to HPUX

gerard.l1.demers@verizon.com
Guest
 
Posts: n/a
#1: Jul 23 '05
I'm looking for a version of this code that has been ported to make
cleanly under HPUX11i. I'm not a C++ progammer and am struggling with
the compiler errors:

vector.hpp:55: error: declaration of `operator<<' as non-function
vector.hpp:55: error: expected `;' before '<' token
Line 55 of vector.hpp:


friend std::ostream& operator << <T> (std::ostream& out, const
vector& v);


Ron Natalie
Guest
 
Posts: n/a
#2: Jul 23 '05

re: looking for version of portfwd ported to HPUX


gerard.l1.demers@verizon.com wrote:[color=blue]
> I'm looking for a version of this code that has been ported to make
> cleanly under HPUX11i. I'm not a C++ progammer and am struggling with
> the compiler errors:
>
> vector.hpp:55: error: declaration of `operator<<' as non-function
> vector.hpp:55: error: expected `;' before '<' token
> Line 55 of vector.hpp:
>
>
> friend std::ostream& operator << <T> (std::ostream& out, const
> vector& v);
>[/color]
Can't be answered without more context. I suspect however that if we
are inside the definition of the vector template itself, it should read:
frind std::ostream& operator << <> (std::ostream& out, const vector<T>& v);

Closed Thread