Sponsored Content
Full Discussion: friend operator
Top Forums Programming friend operator Post 302204131 by asji on Tuesday 10th of June 2008 07:23:07 PM
Old 06-10-2008
I think you need to put the "friend" after the return value of the operator. I.e.:

ostream& friend operator<<(ostream& target, const PARA_DSC& para);

If "friend" is the first token, then it expects the declaration of a friend class.
 

3 More Discussions You Might Find Interesting

1. UNIX Desktop Questions & Answers

Find a friend

I am unix beginner, aspiration learning with unix. i want get help for unix .I have a dream that i become unix master-hand. I wish get your assist for unix or net. (2 Replies)
Discussion started by: Yeliu
2 Replies

2. UNIX for Dummies Questions & Answers

welcome YOUR NEW FRIEND RETO

Hello Every One Iam Your New Friend Reto .iam New In Unix Let Me Say That Iam Zero . And I Wish That You All Can Help Me With It By Your Help I Will Get To The Top Your New Friend Reto From Iraq Thank You All (0 Replies)
Discussion started by: retolop
0 Replies

3. Programming

What are Friend Functions in C++?

Hey C++ masters! I am a beginner in C++ and learning about it but have some doubts about Friend Functions. Anyone describe C++ Friend Functions? (1 Reply)
Discussion started by: ggiwebsinfo
1 Replies
quadrature(7rheolef)						    rheolef-6.1 					      quadrature(7rheolef)

NAME
quadrature - quadrature formulae on the reference lement SYNOPSYS
The quadrature class defines a container for a quadrature formulae on the reference element (see reference_element(2)). This container stores the nodes coordinates and the weights. THE CONSTRUCTOR TAKES TWO ARGUMENTS
the reference element K and the order r of the quadrature formulae. The formulae is exact when computing the integral of a polynom p that degree is less or equal to order r. n / ___ | p(x) dx = p(x_q) w_q / K /__ q=1 LIMITATIONS
The formulae is optimal when it uses a minimal number of nodes n. Optimal quadrature formula are hard-coded in this class. Not all refer- ence elements and orders are yet implemented. This class will be completed in the future. IMPLEMENTATION
template<class T> class quadrature { public: // typedefs: typedef typename quadrature_on_geo<T>::size_type size_type; typedef quadrature_option_type::family_type family_type; typedef typename std::vector<weighted_point<T> >::const_iterator const_iterator; // allocators: quadrature (quadrature_option_type opt = quadrature_option_type()); // modifiers: void set_order (size_type order); void set_family (family_type ft); // accessors: size_type get_order() const; family_type get_family() const; std::string get_family_name() const; size_type size (reference_element hat_K) const; const_iterator begin (reference_element hat_K) const; const_iterator end (reference_element hat_K) const; template<class U> friend std::ostream& operator<< (std::ostream&, const quadrature<U>&); protected: quadrature_option_type _options; mutable quadrature_on_geo<T> _quad [reference_element::max_variant]; mutable std::vector<bool> _initialized; void _initialize (reference_element hat_K) const; private: quadrature (const quadrature<T>&); quadrature operator= (const quadrature<T>&); }; SEE ALSO
reference_element(2) rheolef-6.1 rheolef-6.1 quadrature(7rheolef)
All times are GMT -4. The time now is 09:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy