Article View: pl.comp.objects
Article #4770C++ i friends (the last part)
From: Marilyn Manson
Date: Mon, 18 Jan 1999 13:08
Date: Mon, 18 Jan 1999 13:08
34 lines
1356 bytes
1356 bytes
Zrobilem tak:
class klasa0
{
friend class klasa1;
klasa0(){};
};
class klasa1
{
klasa0 obiekt;
};
void main()
{
klasa1 obiekt;
}
i bylo Compiler could not generate default constructor
JESLI W KLASIE1 DOPISALEM public: klasa1(){}; WSZYSTKO GRALO
(hmm...)
i uwaga! W OBU PRZYPADKACH NIE BYLO ROZNICY W ZACHOWANIU SIE KOMPILATORA
CZY W KLASIE0 JEST friend class klasa1; CZY friend klasa1;
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
uzywalem Borland C++ 3.1
Do Pana Dariusza Slusarczyka: poprzedni kod pisalem na zywo (nie Ctrl+C;
Ctrl+V z pliku) i nie zwazalem na takie niuanse jak srednik, UWAZALEM, ZE TO
OCZYWISTE ZE TAM MA BYC SREDNIK
manson
Technical Details
Message-ID:
<77vblu$amd$1@sun1000.pwr.wroc.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!mat.uni.torun.pl!news.nask.pl!news.icm.edu.pl!news.man.poznan.pl!news.man.lodz.pl!pwr.wroc.pl!not-for-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!mat.uni.torun.pl!news.nask.pl!news.icm.edu.pl!news.man.poznan.pl!news.man.lodz.pl!pwr.wroc.pl!not-for-mail From: "Marilyn Manson" <manson@tower.t16.ds.pwr.wroc.pl> Newsgroups: pl.comp.objects Subject: C++ i friends (the last part) Date: Mon, 18 Jan 1999 14:08:30 +0100 Organization: Technical Univeristy of Wroclaw Lines: 37 Message-ID: <77vblu$amd$1@sun1000.pwr.wroc.pl> NNTP-Posting-Host: manson.t16.ds.pwr.wroc.pl X-Newsreader: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit