🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: be.comp.programming
Article #9699

Re: vraag geherfomuleerd

#9699
From: Haplo
Date: Sat, 13 Apr 2002 09:57
35 lines
2037 bytes
> Mijn vraag opnieuw :
>
> in mijn datum class staat
>      friend ostream&     operator<<   (ostream&,Datum &)  ;
> in mijn string class staat
>      friend ostream&     operator<<   (ostream&,String &)  ;
>
> dit is mijn persoon class :
> class Persoon
> {
>  private:
>     String naam;
>     String voornaam;
>     Datum gbdatum;
>  public:
>      Persoon      (String,String,int,int,int)   ;
>      friend ostream&     operator<<   (ostream&,Persoon &)  ;
> };
>
> Mijn vraag is nu hoe kan ik die friends uit mijn datum en string
> aanspreken vanuit persoon zodat ik naam, voornaam en gbdatum alleen
> kan afdrukken. Als dat mogelijk is.

Bedoel je iets in deze aard?

ostream& operator<< (ostream& os, const Persoon& persoon)
{
    os << "Naam = " << persoon.naam << endl;
    os << "Voornaam = " << persoon.voornaam << endl;
    os << "GebDatum = " << persoon.gbdatum << endl;

    return os;
}

Haplo
Technical Details
Message-ID: <ciTt8.14754$Ze.3412@afrodite.telenet-ops.be>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!iad-peer.news.verio.net!news.verio.net!skynet.be!skynet.be!ossa.telenet-ops.be!afrodite.telenet-ops.be.POSTED!not-for-mail
References: <li4dbu47b1n1kqp5rbulsbspte2kpl229m@4ax.com> <2klebu0botb9q8fv8satarbl2djf40b3so@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII-7-bit
X-Google-Thread: fcea4,7a64caa31a77d9e4
X-Google-Attributes: gidfcea4,public
X-Google-ArrivalTime: 2002-04-13 02:57:29 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!iad-peer.news.verio.net!news.verio.net!skynet.be!skynet.be!ossa.telenet-ops.be!afrodite.telenet-ops.be.POSTED!not-for-mail
From: "Haplo" <valgaeren@pandora.be>
Newsgroups: be.comp.programming
References: <li4dbu47b1n1kqp5rbulsbspte2kpl229m@4ax.com> <2klebu0botb9q8fv8satarbl2djf40b3so@4ax.com>
Subject: Re: vraag geherfomuleerd
Lines: 37
Organization: Monkey Business
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Message-ID: <ciTt8.14754$Ze.3412@afrodite.telenet-ops.be>
Date: Sat, 13 Apr 2002 09:57:28 GMT
NNTP-Posting-Host: 213.224.193.109
X-Complaints-To: abuse@telenet.be
X-Trace: afrodite.telenet-ops.be 1018691848 213.224.193.109 (Sat, 13 Apr 2002 11:57:28 MET DST)
NNTP-Posting-Date: Sat, 13 Apr 2002 11:57:28 MET DST