🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #482

g++ classes as friends

#482
From: Daniel M Higgins
Date: Tue, 13 Oct 1992 01:09
18 lines
933 bytes
I tried to compile C++ code, using g++, in which I declared a class as 
a friend to a class


I got an error message of "class_name2" is not a function 
and cannot be declares as a friend of "class_name1"

the code compiles eithout problems on the AT&T C++

are classes as friends illegal on the gnu g++ complier? Perhaps it is 
allowed on a newer version.  I believe I used 4.5 but Im pretty stupid
when it comes to computer things


thankyou
	daniel

daniel_x@athena.mit.edu
Technical Details
Message-ID: <1992Oct13.010907.5696@athena.mit.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!snorkelwacker.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!daniel_x

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!sparky!uunet!snorkelwacker.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!daniel_x
From: daniel_x@athena.mit.edu (Daniel M Higgins)
Subject: g++  classes as friends 
Message-ID: <1992Oct13.010907.5696@athena.mit.edu>
Sender: news@athena.mit.edu (News system)
Nntp-Posting-Host: w20-575-109.mit.edu
Organization: Massachusetts Institute of Technology
Date: Tue, 13 Oct 1992 01:09:07 GMT
Lines: 18