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
ost::Number(3)						     Library Functions Manual						    ost::Number(3)

NAME
ost::Number - A number manipulation class. SYNOPSIS
#include <numbers.h> Inherited by ost::DateNumber, and ost::ZNumber. Public Member Functions Number (char *buffer, unsigned size) Create an instance of a number. void setValue (long value) const char * getBuffer () const long getValue () const long operator() () operator long () operator char * () long operator= (const long value) long operator+= (const long value) long operator-= (const long value) long operator-- () long operator++ () int operator== (const Number &num) int operator!= (const Number &num) int operator< (const Number &num) int operator<= (const Number &num) int operator> (const Number &num) int operator>= (const Number &num) Protected Attributes char * buffer unsigned size Friends long operator+ (const Number &num, const long val) long operator+ (const long val, const Number &num) long operator- (const Number &num, long val) long operator- (const long val, const Number &num) Detailed Description A number manipulation class. This is used to extract, convert, and manage simple numbers that are represented in C ascii strings in a very quick and optimal way. Author: David Sugar dyfet@ostel.com number manipulation. Constructor &; Destructor Documentation ost::Number::Number (char *buffer, unsignedsize) Create an instance of a number. Parameters: buffer or NULL if created internally. size use - values for zero filled. Member Function Documentation const char* ost::Number::getBuffer () const [inline] long ost::Number::getValue () const ost::Number::operator char * () [inline] ost::Number::operator long () [inline] int ost::Number::operator!= (const Number &num) long ost::Number::operator() () [inline] long ost::Number::operator++ () long ost::Number::operator+= (const longvalue) long ost::Number::operator-- () long ost::Number::operator-= (const longvalue) int ost::Number::operator< (const Number &num) int ost::Number::operator<= (const Number &num) long ost::Number::operator= (const longvalue) Reimplemented in ost::ZNumber. int ost::Number::operator== (const Number &num) int ost::Number::operator> (const Number &num) int ost::Number::operator>= (const Number &num) void ost::Number::setValue (longvalue) Reimplemented in ost::ZNumber. Friends And Related Function Documentation long operator+ (const Number &num, const longval) [friend] long operator+ (const longval, const Number &num) [friend] long operator- (const Number &num, longval) [friend] long operator- (const longval, const Number &num) [friend] Member Data Documentation char* ost::Number::buffer [protected] unsigned ost::Number::size [protected] Author Generated automatically by Doxygen for GNU CommonC++ from the source code. GNU CommonC++ Sat Jun 23 2012 ost::Number(3)
All times are GMT -4. The time now is 08:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy