Sponsored Content
Full Discussion: friend operator
Top Forums Programming friend operator Post 302071827 by nik on Tuesday 25th of April 2006 05:42:56 AM
Old 04-25-2006
friend operator

Hello,

I have a problem by compiling a class with the following friend function in Header file:

class X{

private:
......

protected:
.......

public:

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


};


the compiler output is:

"X.hxx", line 346: Warning (Anachronism): Class friends require an explicit "class".
"X.hxx", line 346: Error: "," expected instead of "&".
1 Error(s) and 1 Warning(s) detected.
*** Error code 1

Has anybody an idea, where the problem coud be?


Greetings

nik
 

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

NAME
ost::IPV4Host - This object is used to hold the actual and valid internet address of a specific host machine that will be accessed through a socket. SYNOPSIS
#include <address.h> Inherits ost::IPV4Address. Public Member Functions IPV4Host (const char *host=NULL) Create a new host address for a specific internet host. IPV4Host (struct in_addr addr) Convert a system socket binary address such as may be returned through the accept() call or getsockpeer() into an internet host address object. IPV4Address & operator= (unsigned long addr) Allows assignment from the return of functions like inet_addr() or htonl() IPV4Host & operator&= (const IPV4Mask &mask) Mask the internet host address object with a network mask address. Friends class __EXPORT IPV4Mask __EXPORT IPV4Host operator& (const IPV4Host &addr, const IPV4Mask &mask) Additional Inherited Members Detailed Description This object is used to hold the actual and valid internet address of a specific host machine that will be accessed through a socket. Author: David Sugar dyfet@ostel.com Address of a specific Internet host machine. Constructor &; Destructor Documentation ost::IPV4Host::IPV4Host (const char *host = NULL) Create a new host address for a specific internet host. The internet host can be specified in a null terminated ASCII string and include either the physical host address or the DNS name of a host machine. Hence, an IPV4Host ('www.voxilla.org') can be directly declaired in this manner. Defaults to the IP address that represents the interface matching 'gethostname()'. Parameters: host dns or physical address of an Internet host. ost::IPV4Host::IPV4Host (struct in_addraddr) Convert a system socket binary address such as may be returned through the accept() call or getsockpeer() into an internet host address object. Parameters: addr binary address of internet host. Member Function Documentation IPV4Host& ost::IPV4Host::operator&= (const IPV4Mask &mask) Mask the internet host address object with a network mask address. This is commonly used to coerce an address by subnet. IPV4Address& ost::IPV4Host::operator= (unsigned longaddr) [inline] Allows assignment from the return of functions like inet_addr() or htonl() Reimplemented from ost::IPV4Address. References ost::IPV4Address::operator=(). Friends And Related Function Documentation friend class __EXPORT IPV4Mask [friend] __EXPORT IPV4Host operator& (const IPV4Host &addr, const IPV4Mask &mask) [friend] Author Generated automatically by Doxygen for GNU CommonC++ from the source code. GNU CommonC++ Sat Jun 23 2012 ost::IPV4Host(3)
All times are GMT -4. The time now is 03:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy